substance / texture

A visual editor for research.
MIT License
1k stars 83 forks source link

Add MultiSelect Form Element #581

Closed michael closed 6 years ago

michael commented 6 years ago

For tasks like associating affiliations with authors we need a multi-select input widget.

image

$$(MultiSelect, {
  selectedOptions: ['aff1', 'aff2'],
  availableOptions: [
    {id: 'aff1', text: 'Linz University, Austria'},
    {id: 'aff2', text: 'Vienna University, Austria'},
    {id: 'aff3', text: 'Graz University, Austria'}
  ],
  selectorLabel: 'Add Affiliation'
})

When changes are made to the selection, an action should be sent up.

this.send('updatedSelection', ['aff1', 'aff2', 'aff3'])

Regarding layout:

Integral commented 6 years ago

See #582. Perhaps I need a mockup to be able to style it with more details.