Wizard: Disable already selected language options
This disables language options that were already added to the image, rendering a description to make the disabled option clear.
This commit is contained in:
parent
62bbf6d688
commit
03294389b1
1 changed files with 8 additions and 1 deletions
|
|
@ -152,7 +152,14 @@ const LanguagesDropDown = () => {
|
|||
>
|
||||
<SelectList>
|
||||
{selectOptions.map((option) => (
|
||||
<SelectOption key={option} value={option}>
|
||||
<SelectOption
|
||||
key={option}
|
||||
value={option}
|
||||
isDisabled={languages?.includes(option) || false}
|
||||
description={
|
||||
languages?.includes(option) && 'Language already added'
|
||||
}
|
||||
>
|
||||
{option}
|
||||
</SelectOption>
|
||||
))}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue