Browse Source

Add emitUpdate

pull/5270/head
Artur Arseniev 3 years ago
parent
commit
83ce74d54f
  1. 10
      src/trait_manager/model/Trait.ts

10
src/trait_manager/model/Trait.ts

@ -53,7 +53,14 @@ export interface TraitProperties {
text?: string;
full?: boolean;
getValue?: (props: { editor: Editor; trait: Trait; component: Component }) => any;
setValue?: (props: { value: any; editor: Editor; trait: Trait; component: Component; partial: boolean }) => void;
setValue?: (props: {
value: any;
editor: Editor;
trait: Trait;
component: Component;
partial: boolean;
emitUpdate: () => void;
}) => void;
}
type TraitOption = {
@ -177,6 +184,7 @@ export default class Trait extends Model<TraitProperties> {
trait: this,
component: this.target,
partial: !!opts.partial,
emitUpdate: () => this.targetUpdated(),
});
return;
}

Loading…
Cancel
Save