🐛(react) fix Select submit button
As the default type of button is "submit", when including a Select inside a form, clicking on any of its button was triggering form submission.
This commit is contained in:
@@ -145,6 +145,7 @@ export const SelectMonoAux = ({
|
||||
e.stopPropagation();
|
||||
}}
|
||||
icon={<span className="material-icons">close</span>}
|
||||
type="button"
|
||||
/>
|
||||
<div className="c__select__inner__actions__separator" />
|
||||
</>
|
||||
@@ -164,6 +165,7 @@ export const SelectMonoAux = ({
|
||||
</span>
|
||||
}
|
||||
disabled={disabled}
|
||||
type="button"
|
||||
{...downshiftReturn.toggleButtonProps}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -125,6 +125,7 @@ export const SelectMultiAux = ({ children, ...props }: SelectMultiAuxProps) => {
|
||||
props.onSelectedItemsChange([]);
|
||||
}}
|
||||
icon={<span className="material-icons">close</span>}
|
||||
type="button"
|
||||
/>
|
||||
<div className="c__select__inner__actions__separator" />
|
||||
</>
|
||||
@@ -143,6 +144,7 @@ export const SelectMultiAux = ({ children, ...props }: SelectMultiAuxProps) => {
|
||||
</span>
|
||||
}
|
||||
disabled={props.disabled}
|
||||
type="button"
|
||||
/>
|
||||
</div>
|
||||
<div className="c__select__inner__value">
|
||||
|
||||
Reference in New Issue
Block a user