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

[docs] adjusted the code example for quickFilterValues #12919

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/data/data-grid/filtering/quick-filter.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The quick filter values can be initialized by setting the `filter.filterModel.qu
filter: {
filterModel: {
items: [],
quickFilterValues: ['quick', 'filter'],
quickFilterValues: ['ab'],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we still somehow reinforce that quickFilterValues is of type string[] and spaces in quick filter are used as delimiter to generate this array (which will somehow get hidden by this change)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sry for the late reply. 🙇🏼
Maybe we could also use a more static dataset like the movie data.
Randomized row values could potentially lead to empty results when we initialize them.

WDYT @MBilalShafi ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sry for the late reply. 🙇🏼

Likewise 😄

Maybe we could also use a more static dataset like the movie data.

Yes, that could even be better. What I meant though was adding a callout above or below this demo which says something like:

:::info
The values entered in quick filter field are delimited using space to generate `quickFilterValues` array which is used in quick filtering.

For example, if you type `quick filter` in the field, it'd be passed as `['quick', 'filter']` to the `filterModel.quickFilterValues`.
:::

},
},
}}
Expand Down