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

Filtering does not work #23

Closed
dukadin opened this issue Mar 14, 2017 · 3 comments
Closed

Filtering does not work #23

dukadin opened this issue Mar 14, 2017 · 3 comments

Comments

@dukadin
Copy link
Contributor

dukadin commented Mar 14, 2017

Filter bar events are not triggered by default inside parent component.
I had to do this in order to make it working:

  • Register event listeners
mounted() {
      this.$events.$on('filter-set', eventData => this.onFilterSet(eventData))
      this.$events.$on('filter-reset', e => this.onFilterReset())
}
  • Moved event methods to methods
    onFilterSet (filterText) {
        this.moreParams = {
            'filter': filterText.trim()
        }
        Vue.nextTick( () => this.$refs.vuetable.refresh())},
    onFilterReset () {
        this.moreParams = {}
        Vue.nextTick( () => this.$refs.vuetable.refresh())
    }
@ratiw
Copy link
Owner

ratiw commented Mar 15, 2017

@dukadin Thanks. This has already been reported in vuetable-2-tutorial-bootstrap and vuetable-2-tutorial-bulma. Just so busy that I couldn't find the time to update it. A PR would be nice if you could help.

@dukadin
Copy link
Contributor Author

dukadin commented Mar 15, 2017

@ratiw Sure, I submited PR.

@ratiw
Copy link
Owner

ratiw commented Mar 16, 2017

@dukadin Thanks, will find time to merge it tonight.

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