Open Reese-Weingaertner opened 4 months ago
If anyone can point me to where to start looking, I'd be happy to work on the change myself.
Hi @Reese-Weingaertner, thanks for reporting the issue.
I believe this is the intended original behavior, so if you want to modify it, I propose to handle it via an option like results_from_all_group
that defaults to False, so that we keep retrocompatibility.
The method that returns the selected object is this: https://github.com/pyrevitlabs/pyRevit/blob/f9fa0d296386d548e198324dd752fb7fb5cd7b58/pyrevitlib/pyrevit/forms/__init__.py#L1054
Sounds like a good idea @sanzoghenzo, thanks for your help. I'll start working on this.
See related discussion here: SelectFromList return_all not returning all
✈ Pre-Flight checks
🐞 Describe the bug
Unsure if this is a bug or intended -- so apologies if this is in the wrong place. I think it could be improved regardless.
When using forms.SelectFromList with a dict(,
) input and setting multiselect=True, the user can make multiple selections from different groups, but only items in the group currently open when clicking the button will be output.
⌨ Error/Debug Message
♻️ To Reproduce
pseudocode to reproduce:
categories = { "one", ['a', 'b', 'c'], "two", ['d', 'e', 'f']} selected = forms.SelectFromList.show(categories, multiselect=True) --- running code : user checks 'a' from "one", changes categories and selects 'd' from "two", then submits output: selected = ['d'] # selection of 'a' is missing, even though it was checked when form was closed
⏲️ Expected behavior
The expected behavior from the above example would be to return ['a', 'd']
🖥️ Hardware and Software Setup (please complete the following information)
Additional context
No response