adazzle / react-data-grid

Feature-rich and customizable data grid React component
https://adazzle.github.io/react-data-grid/
Other
6.99k stars 2.18k forks source link

Populating Dropdown Values for multi-select #1181

Closed madhan-dhamodaran closed 4 years ago

madhan-dhamodaran commented 6 years ago

Which version of React JS are you using?

✅ Officially supported ✅

⚠️ Not officially supported, expect warnings ⚠️

☣️ Not officially supported, expect warnings and errors ☣️


Which browser are you using?

✅ Officially supported ✅

⚠️ Not officially supported, but "should work" ⚠️


I'm submitting a ...

👋 Need general support? Not sure about how to use React itself, or how to get started with the Grid? Please do not submit support request here. Instead see

https://github.com/adazzle/react-data-grid/blob/master/CONTRIBUTING.md


Issue Details

Please include:
- What the current behavior is
- What the desired behvaior is
- (If Bug) Steps to reproduce the issue
- (If Feature) The motivation / use case for the feature

We especially love screenshots / videos of problems, and remember
The Best Issue Is A Pull Request™

@amanmahajan7 @rozeskjm @azu

Hi All,

I have question regarding populating values for the multiselect filter dropdown. The example shows that we are deriving the dropdown values from the data available in the grid. I am able to supply data from the server and get populate values for the dropdown. However, I want to know if in case I need to load thousands of dropdown values, I want to find out if the grid supports when I make a server call once I enter something in the multi-select filter and get matching results and populate only those as dropdown values for that filter.

Something like a typeAhead filter.

Kindly advise.

Thanks, Madhan

amanmahajan7 commented 6 years ago

React Data Grid filters are quite flexible and creating a typehead filter should be doable. A good starting point is AutoCompleteFilter. All a filter needs to do is call props.onChange when a new value is selected. This in turn triggers onAddFilter with new updated filter.

RDG is not concerned with how filters load data. You can probably load data on componentDidMount and when a value is selected call props.onChange

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.

madhan-dhamodaran commented 6 years ago

@amanmahajan7,

I have finished adding this and ready to raise a PR. I have been trying to get in touch with a you guys through email, slack etc., but in vain. I have added one more feature as well for customizable columns. I will raise a new issue for that.

Not sure how to reopen this issue. But, this issue is valid and I will be raising a PR before this weekend

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.

madhan-dhamodaran commented 6 years ago

All,

I am still working on this. I will raise a PR ASAP

Thanks, Madhan

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.

madhan-dhamodaran commented 6 years ago

All,

I am still working on this. I will raise a PR ASAP

Thanks, Madhan

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.

madhan-dhamodaran commented 6 years ago

All,

I am still working on this. I will raise a PR ASAP

Thanks, Madhan

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.

madhan-dhamodaran commented 6 years ago

All,

I am still working on this. I will raise a PR ASAP

Thanks, Madhan

diegohoyola commented 5 years ago

I am having this issue also, can you tell me if the issue has been fixed?

madhan-dhamodaran commented 5 years ago

All,

I am still working on this. I will raise a PR ASAP

Thanks, Madhan

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.

madhan-dhamodaran commented 5 years ago

I have raised a PR for this. Awaiting merge. #1449

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.

madhan-dhamodaran commented 5 years ago

I have raised a PR for this. Awaiting merge. #1449

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.

madhan-dhamodaran commented 5 years ago

I have raised a PR for this. Awaiting merge. #1449

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please reopen this if you feel it has been incorrectly closed and we will do our best to look into it. Thank you for your contributions.

madhan-dhamodaran commented 5 years ago

I have raised a PR for this. Awaiting merge. #1449

amanmahajan7 commented 4 years ago

Starting v7 we are removing any concrete implementations for filters, editors or formatters. We will also remove the react-data-grid-addons package. This was done so users can create their own implementations and tweak it however they like. I would recommend coping Typeahead filter in your local repo

https://github.com/adazzle/react-data-grid/blob/canary/CHANGELOG.md https://github.com/adazzle/react-data-grid/blob/canary/stories/demos/HeaderFilters.tsx https://adazzle.github.io/react-data-grid/canary/?path=/story/demos--header-filters