-
-
Notifications
You must be signed in to change notification settings - Fork 532
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
Datagrid: MultiSelect | ShiftClick Feature #2151
Datagrid: MultiSelect | ShiftClick Feature #2151
Conversation
I tried the PR and there are some issues. When in the multi-select mode you now need to click on checkbox two times to make it selected. Previously it was working fine (I checked in the live demo). |
I see. I was testing on Server and that was not happening. I'll check it out when I have time. What about the question about the |
I would leave |
…://github.com/David-Moreira/Blazorise into dev094-datagrid-multiselect-shiftClickFeature
…f checked from UI confliting.
@stsrki fixed. |
It still doesn't work. If you click on the same checkbox multiple times without moving a mouse then it will not check or uncheck. If you click, move the mouse, and click again then it works. |
O.O Alright, I'll take a look again when I have time. Sorry bout that! |
No worries :) |
Holy crap... it looks like that if you keep clicking it stops propagating the click upward into the row. |
@stsrki also tested, having the Datagrid set to Single mode and just use Ctrl+Click which selects the row if it isnt selected and de-selects the row if selected, same happens, after 2 clicks on a row, stops triggering click event. Although this is a use case most likely noone would ever try. I'm guessing this wouldn't be that wrong to do. What do you think?
Edit: I kinda disregarded the idea of tracking the time between clicks, as delay between the client and the server (on Blazor.Server) can throw if off. We would need to have a check in javascript instead which would then call the server, which I think is an unnecessary bother for this? |
Ahhh so that's the reason! We cannot check for the time between the clicks as that would lead to more complexity than needed. And it would be different than some users have it configured on their own system. This leads me to think we might go with it and merge as it is. As you said, maybe it is not so wrong... |
@stsrki Okay, made the change. |
It still happens but it is good enough. We'll see if there is going to be any complaint and then adjust if needed. Good job and thank you as always 💪 |
@@ -287,9 +287,6 @@ | |||
<SelectItem TValue="string" Value="@("D")">Diverse</SelectItem> | |||
</Select> | |||
</FilterTemplate> | |||
@code{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What the hell was this doing here? Did I merge this in? xDD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be accidentally merged from my own testings. I tend to throw it randomly like that but this time it slipped unnoticed.
Closes #2009
Row appears with text selection on shift click. Should we add :
user-select: none;
style?We could either add that style always or only when MultiSelect is active.
Note: Removed the
@onclick:stopPropagation
from the Multi Select Check so we can propagate click arguments and check for Shift Click, this means that everything is now handled on the HandleClick method instead. So there's a new flag_clickFromCheck
, to check if the click came from the check and avoid calling into the Single Selection Logic just as we were doing before.