Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with @selectionChanged #83

Open
gabrielmelian opened this issue Nov 17, 2021 · 1 comment
Open

Problems with @selectionChanged #83

gabrielmelian opened this issue Nov 17, 2021 · 1 comment

Comments

@gabrielmelian
Copy link

gabrielmelian commented Nov 17, 2021

Hi.

I'm triying to fix a problem with @selectionChanged="selectedRows = $event" on a v-table. I'm triying to get the data after to apply a filter to export to csv. But in my selectedRows: [] never arrive the data filtered. This is my code:

<v-table :data="data" :filters="filters" @selectionChanged="selectedRows = $event" :currentPage.sync="currentPage" :pageSize="pageSize" @totalPagesChanged="totalPages = $event" class="border mx-auto block text-center table table-striped table-bordered table-condensed w-75" :rows-per-page-items="opts">

....

export default {
    name: 'DataTable',
    data: () => ({
        data,
        filters: {
            name: { value: '', keys: ['name'] },
            rate_type: { value: '', keys: ['rate_type'] },
            marketGeoUnitId: { value: '', keys: ['marketGeoUnitId'] },
            destination: { value: '', keys: ['destination'] },
            opened: { value: '', keys: ['opened'] }
        },
        order: 'asc',
        currentPage: 1,
        totalPages: 0,
        opts: [15, 30, 50, 100, -1],
        pageSize: 15,
        selectedRows: []
    }),
}

what I'm doing wrong?

I have "vuejs-smart-table": "0.0.8",

@tochoromero
Copy link
Owner

I would highly recommend you update to the next version.

This is the documentation to export to csv https://vue-smart-table.netlify.app/table-state.html#rows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants