-
Notifications
You must be signed in to change notification settings - Fork 377
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
Custom Header as CheckBox to Select all rows in table. #822
Comments
Please share what you have tried, or some sort of starter code so we can point you in the right direction!
Not sure what you mean by this? |
Thanks @dahlbyk for taking a look.
The Table Columns are defined like this.
As you can see first colum is having customHeadingComponent as CustomHeader: SelectAllRow and customComponent as columnComponent:RowSelection I passed in to . // SelectAllRow CustomHeader Component for header checkBox.
In SelectAllRow i am not able to figure out how I can pass the onChange event to all table rows. Regarding restriction on user to select more than one row, I mean to say is there any property I can pass to Griddle to not allow multiple row selection at a time (i.e user can select only one row at a time or all rows by header checkbox). Thanks. |
OK, based on your commented code in |
Thanks @dahlbyk , I moved to the first approach and make it working somewhat.
With this I am able to see all checkboxes selected when header checkbox is selected. I am now looking for better solution to update the internal Griddle State for more features for this checkbox flow and will check position plugin for reference to do that. Thanks for the guidance. I will post once I am done with that. |
Griddle version
1.13.1
Expected Behavior
I have a customHeaderComponent which is a check box and CustomColumnComponent which has a checkBox for each row in table.
I want to select Header checkbox to select all rows in the table.
Actual Behavior
Could not figure out a way to achieve it. Can someone please help on this?
Also how I can restrict users to select more than one row
The text was updated successfully, but these errors were encountered: