Skip to content

[Autocomplete-Select] Keep all data in options, and allow to retrieve them in onChange #1448

@rodolpheV

Description

@rodolpheV

Current behaviour

The autocomplete select component only keep label and value properties in its options:
edit.js#L153: data.forEach(item => { options.set(item[keyName], item[labelName]); });
And only the key is given to the onChange:
edit.js#L210: onChange(key)

As others data properties are only in the store used by the querySearcher, the view has to directly get them here if needed.

Expected behaviour

Keep all data in options: this.setState({options: data}), or keep them duplicated in data: this.setState({data})
And allow to retrieve them in onChange: onChange(key, option)

Versions

Focus-core: 2.1.1
Focus-components: 2.1.7-1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions