You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
i'm trying to use EuiSuperSelect into a EuiModal and the value change doesn't work : no change at all.
Here is the code to duplicate the issue :
importReact,{Component,Fragment}from"react";import{EuiOverlayMask,EuiModal,EuiModalHeader,EuiModalHeaderTitle,EuiModalBody,EuiModalFooter,EuiButtonEmpty,EuiSuperSelect,EuiSpacer,EuiText}from"@elastic/eui";classSuperSelectEncapsulationextendsComponent{constructor(props){super(props);this.options=[{value: "option_one",inputDisplay: "Option one",dropdownDisplay: (<Fragment><strong>Option one</strong><EuiSpacersize="xs"/><EuiTextsize="s"color="subdued"><pclassName="euiTextColor--subdued">
Has a short description giving more detail to the option.
</p></EuiText></Fragment>)},{value: "option_two",inputDisplay: "Option two",dropdownDisplay: (<Fragment><strong>Option two</strong><EuiSpacersize="xs"/><EuiTextsize="s"color="subdued"><pclassName="euiTextColor--subdued">
Has a short description giving more detail to the option.
</p></EuiText></Fragment>)},{value: "option_three",inputDisplay: "Option three",dropdownDisplay: (<Fragment><strong>Option three</strong><EuiSpacersize="xs"/><EuiTextsize="s"color="subdued"><pclassName="euiTextColor--subdued">
Has a short description giving more detail to the option.
</p></EuiText></Fragment>)}];this.state={value: ""};}onChange=value=>{this.setState({ value });};render(){return(<EuiSuperSelectoptions={this.options}valueOfSelected={this.state.value}onChange={this.onChange}itemLayoutAlign="top"hasDividers/>);}}constTestSuperSelect=()=>{return(<EuiOverlayMask><EuiModal><EuiModalBody><SuperSelectEncapsulation/></EuiModalBody></EuiModal></EuiOverlayMask>);};exportdefaultTestSuperSelect
EuiModal's focus trap is preventing the super select's option box from receiving events as it is rendered at the bottom of the DOM through a portal. I tested this with EuiComboBox as well, and selecting a combo box option with the mouse does not work for the same reason, though keyboard navigation of options works as that selection/focus is simulated; keyboard navigation of the super select options does not work.
Hi,
i'm trying to use EuiSuperSelect into a EuiModal and the value change doesn't work : no change at all.
Here is the code to duplicate the issue :
I'm using the EuiSuperSelect example founded here https://elastic.github.io/eui/#/forms/superselect .
Note that the EuiSelect works fine.
Do you have an idea? thx a lot
The text was updated successfully, but these errors were encountered: