mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
sort all select options alphabetically
This commit is contained in:
parent
05b3cfcc74
commit
49efed73c7
@ -76,16 +76,18 @@ export default class Input extends PureComponent<InputProps, InputState> {
|
|||||||
>
|
>
|
||||||
<option value="">---</option>
|
<option value="">---</option>
|
||||||
{options &&
|
{options &&
|
||||||
options.map((option: string, index: number) => (
|
options
|
||||||
<option
|
.sort((a, b) => a.localeCompare(b))
|
||||||
key={index}
|
.map((option: string, index: number) => (
|
||||||
value={slugify(option, {
|
<option
|
||||||
lower: true
|
key={index}
|
||||||
})}
|
value={slugify(option, {
|
||||||
>
|
lower: true
|
||||||
{option}
|
})}
|
||||||
</option>
|
>
|
||||||
))}
|
{option}
|
||||||
|
</option>
|
||||||
|
))}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user