-
Notifications
You must be signed in to change notification settings - Fork 23
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
Filter selected rows #148
Comments
"I use
|
The current implementation remembers the state of the "select all" checkbox. That means, what you are trying to do cannot work anymore. Without understanding your use case, I think it's also quite counter-intuitive to check the "select all" checkbox, but in reality there are exceptions and "not all" rows are actually selected. How would the user even notice, if one or two rows are not selected on the last page, which is not immediately visible? Maybe an (unsupported) solution for your problem is to invoke the
This is just a wild guess and maybe something more is necessary (because that invocation will result in another row selection event which might need to be suppressed, e.g.). But maybe it's already pointing you in the right direction. |
What I have now is
However using Please check: |
I found a working method
So anything through
will not! This is a working fork: https://stackblitz.com/edit/ngx-formly-ui-bootstrap-8whpda?file=src%2Fapp%2Fapp.component.ts However there is an issue, |
Yes, your observation is correct. It looks like Sometimes, methods of I think there is no good work around for your use case. So here is my proposal: How about a configuration setting that allows you to choose whether "select all" should really select all rows or just the visible rows. The currently available select modes are Still I am not so convinced that you get the user experience you want. Because actively de-selecting rows that were selected by "select all" will definitely need to result in the "select all" checkbox being unchecked again. I think there is no way that both the "select all" checkbox is checked and there is a visible row checkbox unchecked. The second thing, that must be considered is, that changing the page would always cause a refresh of the "select all" checkbox. The logic would need to be: if everything on the new page is selected, then check the select all checkbox and uncheck it, otherwise. There is certainly some work involved.... |
I do use Another case that will need |
Good point. Unfortunately the PR for virtual scroll #123 was a one shot that missed. I don't know if people in the NPM ecosystem always expect that their PRs are blindly merged, but I don't think we'll ever see a revision of that PR. But of course, something like virtual scrolling would need to be taken into consideration when implementing something like I cannot plan this feature for 3.2.0 because people are certainly already waiting for Angular 17 support. And to be honest, I don't know if I will find the time and motivation to implement and thoroughly test it anytime soon (see also #116 ). But if you want to give it a shot, I will definitely carefully review the PR and do some tests. You would need to add some demos to the demo application that show the feature in action, though. |
I'm facing an issue with my implementation after the migration
Simply what I use to do is, I use
userRowSelect
eventRowSelectionEvent
to trigger a function that goes through a list and deselects anything that is not supposed to be selected with select allWhat I use to do "before migrating to
angular2-smart-table
isIt seems
getSelectedRows()
is removed, what is the replacement ?getSelectedItems()
?How can I achieve that? I look at the example which uses
multipleSelectRow
fromonGridInit(data: DataSet)
but I don't have the row insideRowSelectionEvent
nor fromGrid
orDataSet
So how should I deselect?
I tried this
The table doesn't show the selected rows, but as soon as I navigate to another page everything appears to be selected
The text was updated successfully, but these errors were encountered: