wonderful-panda/vue-tsx-support

sync modifier or listening for `:update` event

mesqueeb opened this issue · 4 comments

How can I do either:

<MyComponent mode.sync={mode} />

or

<MyComponent mode={mode} on[mode:update]={val => this.mode = val} />

<MyComponent mode={mode} onModeUpdate={fn} />

Thanks !!! I'll try this tomorrow!!! 😉

Sent with GitHawk

@numfin it didn't work.

I can catch the event in the Vue dev tools:
image

But even though I added this to my TSX template:

onUpdateMode={(val: string) => (this.mode = val)}

nothing happened

This worked:

on={{'update:mode': () => ()}}