fix study tag update
This commit is contained in:
parent
2760023ead
commit
d29dd1135d
|
@ -7,6 +7,7 @@ import { StudyCtrl, StudyChapter } from './interfaces';
|
|||
|
||||
function editable(value: string, submit: (v: string, el: HTMLInputElement) => void): VNode {
|
||||
return h('input', {
|
||||
key: value, // force to redraw on change, to visibly update the input value
|
||||
attrs: {
|
||||
spellcheck: false,
|
||||
value
|
||||
|
@ -110,6 +111,7 @@ function doRender(root: StudyCtrl): VNode {
|
|||
|
||||
export function view(root: StudyCtrl): VNode {
|
||||
const chapter = root.tags.getChapter(),
|
||||
key = chapter.id + root.data.name + chapter.name + root.data.likes + chapter.tags + root.vm.mode.write;
|
||||
tagKey = chapter.tags.map(t => t[1]).join(','),
|
||||
key = chapter.id + root.data.name + chapter.name + root.data.likes + tagKey + root.vm.mode.write;
|
||||
return thunk('div.undertable_inner.' + chapter.id, doRender, [root, key]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue