Closed Ducasse closed 7 months ago
you mean like by default?
Yes. And may be with a message not to do it for people that do not understand UX. Like that we can often do enter and get done :)
Uhm... it seems is already like that:
SpSelectDialog>>items: aCollection
list items: aCollection.
aCollection size > 1
ifTrue: [ list selectItem: aCollection first ]
and testing it, it seems to work:
StPharoApplication current newSelect
items: #(x y z);
openModal.
EDIT: And now that I see, you did that, in December :)
maybe better just to ask for not empty, instead size?
This is strange because in some refactorings the first item is not selected and this is why I thought that we lost it. Yes size > 1 is a bad idea since this is my bug. If you have a list with only element then you still want to select it. Good cath!
So it was not lost but I just badly coded it.
SpSelectDialog should select the first item.