fix bug in in node views, fix #652
This commit is contained in:
@@ -17,12 +17,6 @@ export default class Placeholder extends Extension {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
get update() {
|
|
||||||
return view => {
|
|
||||||
view.updateState(view.state)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
get plugins() {
|
get plugins() {
|
||||||
return [
|
return [
|
||||||
new Plugin({
|
new Plugin({
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ export default class ComponentView {
|
|||||||
if (typeof this.extension.setSelection === 'function') {
|
if (typeof this.extension.setSelection === 'function') {
|
||||||
this.setSelection = this.extension.setSelection
|
this.setSelection = this.extension.setSelection
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeof this.extension.update === 'function') {
|
if (typeof this.extension.update === 'function') {
|
||||||
this.update = this.extension.update
|
this.update = this.extension.update
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,10 +23,6 @@ export default class Extension {
|
|||||||
return 'extension'
|
return 'extension'
|
||||||
}
|
}
|
||||||
|
|
||||||
get update() {
|
|
||||||
return () => {}
|
|
||||||
}
|
|
||||||
|
|
||||||
get defaultOptions() {
|
get defaultOptions() {
|
||||||
return {}
|
return {}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export default class ExtensionManager {
|
|||||||
Object.assign(obj, { [prop]: value })
|
Object.assign(obj, { [prop]: value })
|
||||||
|
|
||||||
if (changed) {
|
if (changed) {
|
||||||
extension.update(view)
|
view.updateState(view.state)
|
||||||
}
|
}
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|||||||
Reference in New Issue
Block a user