This repository has been archived by the owner on Feb 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 519
Added a Filter that can search by column #306
Open
SMxJrz
wants to merge
5
commits into
daniel-nagy:master
Choose a base branch
from
SMxJrz:filtering
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… filter on each column. The filter uses the column object to perform the checks and It will do lookups to the table data based on the orderBy attribute, (alternatively you can provide searchBy in that object if you don't want to do ordering for that particular column). This change only provides the filter for the user, how they lay it out should ultimately be up to them.
… filter on each column. The filter uses the column object to perform the checks and It will do lookups to the table data based on the orderBy attribute, (alternatively you can provide searchBy in that object if you don't want to do ordering for that particular column). This change only provides the filter for the user, how they lay it out should ultimately be up to them.
# Conflicts: # src/scripts/mdTableFilter.js
# Conflicts: # src/scripts/mdTableFilter.js
+1 |
10 similar comments
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
+1 |
Is there a demo of this anywhere? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
First off: Great table, I really love the look and feel, and it has worked great for me so far.
So I generally have had needs to be able to filter by column for my applications and I noticed that this library doesn't really have that out of the box. The beautiful thing about this library is the control i have over the Dataset with the filtering and orderBy. I had originally wrote this as a custom filter inside of the apps i had used the table in, but I had noticed that it's pretty much the same code every time i need it in an app, I feel like the filter is generic enough so I had the idea of just adding it as a filter in this library.
The general idea is that it's still up to the user to provide the interface for filtering but now they can reference this filter and hook up their inputs to it. The filter just requires an object that maps the columns to the filter (easy enough if you define the columns object like the example app)
This filter is case insensitive with regards to the data in each column. I have also updated the demo app to use the filter, you can see how it works there, What do you think?
-SM
P.S. - I think this would address #283 but they are probably looking for a full-on magic UI feature but I think the users should design their filter ui's the way they want it to look and feel