Closed LokeshBoran closed 6 years ago
Yeah, this is a bug for sure, I was a bit fast with the last fix and I realised I missed a thing now when I took another look at it. To make this work good I think the server needs to know when the client thinks all rows are selected. Say I check all rows and click delete, in my opinion it should delete all rows not just the once visible. So I'm thinking about adding a property to store the state of the client, something like lazyAllSelected
that can be true or false. If true, all rows will appear to be checked when fetched by the sever even though the selectedRows
array will only hold the rows that have actually been fetched. Does that make sense?
Yes, It is perfectly fine. As an end user let say I clicked on select all then it should select only visible records or action should be performed on visible records. Or it should be configurable. I think lazyAllSelected
will be used for both cases.
Hey, @LokeshBoran I am Facing the same Issue. Did you have any Solution for this?
@jigar-g No, but I think @hjalmers fixing this in next build.
I've added a fix for this in v4.16.0 so please give it a try @LokeshBoran and @jigar-g and let me know if you have any issues or questions regarding the implementation. If the checkbox in the table header is checked, all rows that are fetched will be added to the selection once loaded. The "select all" checkbox will be unchecked when a row is unselected i.e. when not all rows are selected anymore. Even though the table will know which records have been selected client side, it's important to look at the lazyAllSelected
property on the table if the server wants to know if the client thinks that all rows are selected or not.
The last checkbox issue is fixed but now if let say my API returns 12 records and the page size is 10 then checkbox functionality is not working. Please check example.
Step to reproduce -
Simply click on
select/deselect all checkbox
it won't work.It only works if