vuejs / babel-plugin-transform-vue-jsx

babel plugin for vue 2.0 jsx
1.85k stars 132 forks source link

Vuetify modifiers behave differently #181

Open Shinigami92 opened 5 years ago

Shinigami92 commented 5 years ago

I'm a little bit confused where this should be handles. Comming from vuetify-tsx, we have <VDataTable> and the pagination object.

There are some attributes: pagination or pagination.sync introduced by vuetify. Because jsx/tsx dont support attributes like pagination.sync we have to write pagination_sync but this behaves in another way as pagination.sync :(

To create the exact same behaviour like pagination.sync we need to write

// ...
pagination={this.pagination}
on={{
  'update:pagination': (pagination: Pagination): void => {
    this.pagination = pagination;
  },
}}
// ...

Example can be found here: https://github.com/chanlito/vuetify-tsx/blob/master/src/views/examples/DataTables.tsx