dropdown: enable mutliple selection by default#320
dropdown: enable mutliple selection by default#320jrcastro2 wants to merge 1 commit intoinveniosoftware:masterfrom
Conversation
jrcastro2
commented
Dec 4, 2025
- Adds support and default implementation for multiple selection
- closes 1 - Enhance e-mail notifications CERNDocumentServer/cds-rdm#628
7d88453 to
12760f0
Compare
| import { FeedbackLabel } from "../forms/FeedbackLabel"; | ||
|
|
||
| export class SelectField extends Component { | ||
| constructor(props) { |
There was a problem hiding this comment.
not sure I understand why we need to add state management for this component, could you explain me?
There was a problem hiding this comment.
Sure! We need to add the options to the state because now they are not static only. On a traditional SelectField you would pass the options before (such as vocabularies) but now for the emails for example we want to allow to add new values on the SelectField, to display these values we need to add them to the options as well alongside to the already default static ones passed, otherwise they will not show in the field itself. And also we need it to update the options as we add new items to it manually.
There was a problem hiding this comment.
we were already able to add new options in the keyword field (deposit form), can't we use the same component, instead of changing the select? I think Select is specifically done so you can select from an existing list, not to add new ones
It would be better to avoid complex component, and have them handle a single responsibility
There was a problem hiding this comment.
Hmmm, the keyword field in the deposit form that you refer to uses a more the RemoteSelectField, which performs async searches against an API endpoint to fetch predefined options. What we need here is the ability to add arbitrary values (like email addresses) that don't exist in any backend list. allowAdditions is a standard SUI feature. I agree that the implementation of this feature looks a bit complex, at the same time I believe is a feature that belongs to the SelectField and that enhances the usability of this field, while keeping it backwards compatible.
Happy to discuss further about this if needed.
* Adds support and default implementation for multiple selection * closes CERNDocumentServer/cds-rdm#628
12760f0 to
ab2ea93
Compare