🐛 Fixing select in forms
This commit is contained in:
parent
699b85bc41
commit
281126df6d
@ -14,6 +14,7 @@ type IProps = {
|
||||
hasBorderRightCollapsed?: boolean;
|
||||
placeholder?: string;
|
||||
className?: string;
|
||||
name?: string;
|
||||
};
|
||||
|
||||
export type IOption = {
|
||||
@ -50,6 +51,7 @@ export default class Select extends React.Component<IProps, IState> {
|
||||
const selectedOption = this.state.selectedOption ?? this.props.selectedOption;
|
||||
return (
|
||||
<div className={classNames(classes["root"], this.props.className)} ref={this.rootRef}>
|
||||
{selectedOption && <input type="text" defaultValue={selectedOption.value as string} name={this.props.name} hidden />}
|
||||
<label
|
||||
className={classNames(classes["container-label"])}
|
||||
data-open={this.state.isOpen}
|
||||
|
Loading…
x
Reference in New Issue
Block a user