🐛(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:
Nathan Vasse
2024-02-02 15:14:10 +01:00
committed by NathanVss
parent e79768c7ce
commit f16eed9a6d
3 changed files with 9 additions and 0 deletions

View File

@@ -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>

View File

@@ -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">