I use Vue2.js and Element UI as a framework. I would like to be able to filter a chopped table. To do this, I use the table and filter components, the documentation of which can be found here .
OK position
The table is not chopped. When you select a filter, the loop goes through each row and checks if the column value is equal to the filter.
The situation is not OK
The table is chopped. When you select a filter, the loop goes through each row that is the result of the slice and checks if the column value matches the filter. By doing this, we do not filter the "hidden" values.
I did a bit of https://jsfiddle.net/acm3q6q8/3/ , so it’s easier to understand.
All this makes sense, since I'm not working on whole data, but on a sparse version.
One solution might be to hide the lines, rather than exclude them by cutting the data, but I wonder if there is a better solution?
What i want to achieve
- Only 2 elements
jsfiddle displayed in jsfiddle . - Filter the
tag to display only those lines whose Office tag
Actual result
The row is not displayed because the row in which the tag was an office was not part of a sliced table.
Expected Result
When filtering, I would like to consider lines that are not necessarily displayed.
Attention!
This should work fine with multiple filters (i.e. I select multiple tags)
EDIT
To the same extent, if you want to sort the name alphabetically, Albert will not be displayed if you displayed only 2 elements.
source share