JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › Data Grid Checkbox Unselect keeps row highlighted
Tagged: smartgrid
- This topic has 3 replies, 2 voices, and was last updated 2 years, 1 month ago by admin.
-
AuthorPosts
-
October 11, 2022 at 3:56 am #103821Kristopher HillParticipant
If you test in the grid example with checkbox selection, when you click the box for that row and then uncheck it, the highlight circle around the checkbox stays there and the row stays highlighted as if it is still selected. Other grid controls that I see fully unhighlight the row once the box is unchecked including the jqwidgets grid (you can do the same test to see it unhighlight the row).
Is this a bug that can be fixed or a workaround so that checked rows all highlight the same color when checked and when unchecked the highlighting and circle go away?
Thanks
October 11, 2022 at 4:58 pm #103823adminKeymasterHi Kristopher,
The behavior is actually by design. When you check/uncheck the row’s selection is changed. However, the row is on focus as it is the currently active element after you clicked it and if you press the arrow up/down you can notice that the focus selection starts from it. If you check more than 1 row, you will notice that the style of the selected rows and the focused row are different. If you want to turn off this, you can edit the CSS style for the smart-grid-cell element when the smart-grid-row has the focus attribute.
Best regards,
Peter StoevSmart UI Team
https://www.htmlelements.com/October 12, 2022 at 1:39 am #103825Kristopher HillParticipantThanks, I was able to essentially pull out the “focus” attribute through combination of CSS and hooking into events. With checkboxes or selections it seems confusing to have focus and selection since focus looks selected. I would ask that in a future release it would be nice if “focus” could be controlled with an option to not allow focus or if it was ignore when selection is enabled somehow. If I select a row I want it selected only not selected an focused especially in the case where the row is not selected but focused. In cell usage it is probably needed but in row selection it doesn’t “feel” correct compared to similar controls.
Thank you,
Kris
October 12, 2022 at 9:50 am #103827adminKeymasterHi Kris,
The focus is much related to the keyboard navigation in order to inform the user where the keyboard navigation starts from. We will consider your comments by adding a property to disable the keyboard navigation so in that case, we would not add focus to elements.
Best regards,
Peter StoevSmart UI Team
https://www.htmlelements.com/ -
AuthorPosts
- You must be logged in to reply to this topic.