mirror of
https://github.com/portainer/portainer.git
synced 2025-08-02 20:35:25 +02:00
chore(automation): give unique selectors [r8s-168] (#345)
Co-authored-by: JamesPlayer <james.player@portainer.io>
This commit is contained in:
parent
b30a1b5250
commit
c80cc6e268
29 changed files with 38 additions and 4 deletions
|
@ -104,6 +104,7 @@ export function TagSelector({
|
|||
onCreateOption={handleCreateOption}
|
||||
aria-label="Tags"
|
||||
data-cy="environment-tags-selector"
|
||||
id="environment-tags-selector"
|
||||
/>
|
||||
</FormControl>
|
||||
</>
|
||||
|
|
|
@ -36,6 +36,7 @@ export function UsersSelector({
|
|||
onChange(selectedUsers.map((user) => user.Id))
|
||||
}
|
||||
data-cy={dataCy}
|
||||
id={dataCy}
|
||||
inputId={inputId}
|
||||
placeholder={placeholder}
|
||||
isDisabled={disabled}
|
||||
|
|
|
@ -18,6 +18,7 @@ export function Select<T extends number | string>({
|
|||
options,
|
||||
className,
|
||||
'data-cy': dataCy,
|
||||
id,
|
||||
...props
|
||||
}: Props<T> & SelectHTMLAttributes<HTMLSelectElement>) {
|
||||
return (
|
||||
|
|
|
@ -111,6 +111,7 @@ export function SingleSelect<TValue = string>({
|
|||
onChange={(option) => onChange(option ? option.value : null)}
|
||||
isOptionDisabled={(option) => !!option.disabled}
|
||||
data-cy={dataCy}
|
||||
id={dataCy}
|
||||
inputId={inputId}
|
||||
placeholder={placeholder}
|
||||
isDisabled={disabled}
|
||||
|
@ -177,6 +178,7 @@ export function MultiSelect<TValue = string>({
|
|||
closeMenuOnSelect={false}
|
||||
onChange={(newValue) => onChange(newValue.map((option) => option.value))}
|
||||
data-cy={dataCy}
|
||||
id={dataCy}
|
||||
inputId={inputId}
|
||||
placeholder={placeholder}
|
||||
isDisabled={disabled}
|
||||
|
|
|
@ -65,6 +65,7 @@ export function Select<
|
|||
}: Props<Option, IsMulti, Group> &
|
||||
AutomationTestingProps & {
|
||||
isItemVisible?: (item: Option, search: string) => boolean;
|
||||
id: string;
|
||||
}) {
|
||||
const Component = isCreatable ? ReactSelectCreatable : ReactSelect;
|
||||
const { options } = props;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue