WebUI: Add checkboxes for easy selection on mobile #22892
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #22701
I assume tasks refers to torrents until told otherwise.
Summary
Adds a setting that when turned
ON
renders a left most column that represents a checkbox in the torrents tableThe state of this checkbox updates on torrent select/deselect to highlight the currently selected torrents
Checking/Unchecking the box allows for easier management of multiple torrents through a touch-screen device where selecting multiple non sequential torrents is more difficult than when using a mouse.
Notes
jsManaged
(boolean) attribute in to thecolumn
object, which would befalse
by default, but in case it istrue
we will trigger the column'supdateTd
regardless of change in server response.DynamicTable.selectAll
&DynamicTable.deselectAll
did not trigger the event (onSelectedRowChanged
) thatselectRow
and its related do, might have been done with performance in mind, dont have that much torrents to test with. Made it fire the events in order to be able to detect selection of all torrents.touchstart
event ofdynamicTableDiv
. On desktop all was good, but on mobile this event fires together with the checkbox click and effectively deselects the selected row causing the checkbox to "blink" on for a second and then become unchecked again.