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

External filter problem #16

Open
userquin opened this issue Mar 27, 2017 · 2 comments
Open

External filter problem #16

userquin opened this issue Mar 27, 2017 · 2 comments

Comments

@userquin
Copy link

I have a complex filter that cannot be integrated in headers. Instead the mediator switch the table to another component containing the filter (in the same page via iron-pages or neon-animated-pages), but when this custom/complex filter results in no results (after applying dynamic server request), the [no-result] is never shown.

The problem is that table is taking into account filterCount when there is no any filter:

        _computeNoResults: function(itemsCount, filterCount) {
          return filterCount && itemsCount === 0;
        },

The solution would be to check if there is some filter configured in the table not just check the key/value pairs in filter property. Maybe just include a boolean property to inform table the filter is external...

@web-padawan
Copy link
Contributor

Actually this can be reached by re-implementing external dataSource, which was possible to use in iron-data-table, from where I grabbed most of initial code for this element.

I'm going to have a quick look at this tonight and to provide a branch from where you could start experimenting with external dataSource. This should make external sorting easier as well.

@web-padawan
Copy link
Contributor

UPD: I started playing with dataSource, but the code is not ready yet. Hope I will be able to provide an example later on this week, there are some things to refactor for using external data source.

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

No branches or pull requests

2 participants