Skip to content

[EuiSuperSelect] Ignores readOnly prop #3510

@mwswindle

Description

@mwswindle

I'm developing a plugin on Kibana v7.7.0 tag, which is using elastic/eui v21.0.1.

I'm using the EuiSuperSelect component, which has a readOnly prop. If I set this prop to true, I can see the styling of the component change, removing the shadows, but I'm still able to change the value.

I have several other EUI components (such as EuiFieldText) that use the same readOnlyState variable, that all behave as expected.

<EuiSuperSelect
  readOnly={readOnlyState} // <-- Changes style, but not function
  valueOfSelected={itemId}
  onChange={setItemId} // <-- This is called regardless of *readOnlyState*
  options={itemOptions}
/>

image

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions