sync modifier or listening for `:update` event
mesqueeb opened this issue · 4 comments
mesqueeb commented
How can I do either:
<MyComponent mode.sync={mode} />
or
<MyComponent mode={mode} on[mode:update]={val => this.mode = val} />
numfin commented
<MyComponent mode={mode} onModeUpdate={fn} />
mesqueeb commented
@numfin it didn't work.
I can catch the event in the Vue dev tools:
But even though I added this to my TSX template:
onUpdateMode={(val: string) => (this.mode = val)}
nothing happened
mesqueeb commented
This worked:
on={{'update:mode': () => ()}}