Skip to content
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

Add multi-select mode for lists #1058

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SamWhited
Copy link
Contributor

@SamWhited SamWhited commented Nov 23, 2024

This adds a multi-select mode for lists in which the current selection changes to be a cursor and pressing enter marks the item under the cursor as actually selected.

DropDown is based on list so this should unblock adding a multi-select mode to DropDown's as well (I have a followup PR that I can submit for this if desired).

Updates #330

This adds a multi-select mode for lists in which the current selection
changes to be a cursor and pressing enter marks the item under the
cursor as actually selected.

DropDown is based on list so this should unblock adding a multi-select
mode to DropDown's as well.

Updates rivo#330

Signed-off-by: Sam Whited <sam@samwhited.com>
@SamWhited
Copy link
Contributor Author

Something else I thought of after preparing this that I'd like to get your opinion on: for multi-select in drop down's we'll need a callback for when an option is unselected as well as selected. We could re-use SetSelectedFunc and pass in a negative index to indicate that it was unselected. Eg. an index of 1 means the second item is selected, an index of -1 would mean that the second item was unselected. Because this would only be applicable when multi-select is turned on, current programs would continue to work as expected.

@SamWhited
Copy link
Contributor Author

Gentle ping; no rush of course, I know you're busy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant