Replies: 1 comment 2 replies
-
I implemented the changes here: I think it works, but I'm a bit unhappy about the constructor since overloading is now not possible. Maybe a builder pattern is now needed? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a usecase where I want to offer multi selection with some values already pre selected. Afaik this is currently not supported right?
The only pre selection, which I can see, is a single selection via the
void org.springframework.shell.component.support.AbstractSelectorComponent.setDefaultExpose(I defaultExpose)
. But this is only useful for the SingleItemSelector.Do you think this use cases should be supported? I think it would make sense to either extend the
setDefaultExpose
to also support collections, or rather to have this information directly on the SelectorItem/SelectorItemWrapper. So in addition toenabled
there could be another boolean fieldselected
.During the building of the ItemStateView this could then be extracted and the item could be selected.
I also think
void org.springframework.shell.component.support.AbstractSelectorComponent.initialExpose(C context)
/setDefaultExpose
would then be obsolete.Beta Was this translation helpful? Give feedback.
All reactions