🐛(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:
5
.changeset/hungry-knives-rescue.md
Normal file
5
.changeset/hungry-knives-rescue.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"@openfun/cunningham-react": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
fix Select submit button
|
||||||
@@ -145,6 +145,7 @@ export const SelectMonoAux = ({
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
}}
|
}}
|
||||||
icon={<span className="material-icons">close</span>}
|
icon={<span className="material-icons">close</span>}
|
||||||
|
type="button"
|
||||||
/>
|
/>
|
||||||
<div className="c__select__inner__actions__separator" />
|
<div className="c__select__inner__actions__separator" />
|
||||||
</>
|
</>
|
||||||
@@ -164,6 +165,7 @@ export const SelectMonoAux = ({
|
|||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
type="button"
|
||||||
{...downshiftReturn.toggleButtonProps}
|
{...downshiftReturn.toggleButtonProps}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -125,6 +125,7 @@ export const SelectMultiAux = ({ children, ...props }: SelectMultiAuxProps) => {
|
|||||||
props.onSelectedItemsChange([]);
|
props.onSelectedItemsChange([]);
|
||||||
}}
|
}}
|
||||||
icon={<span className="material-icons">close</span>}
|
icon={<span className="material-icons">close</span>}
|
||||||
|
type="button"
|
||||||
/>
|
/>
|
||||||
<div className="c__select__inner__actions__separator" />
|
<div className="c__select__inner__actions__separator" />
|
||||||
</>
|
</>
|
||||||
@@ -143,6 +144,7 @@ export const SelectMultiAux = ({ children, ...props }: SelectMultiAuxProps) => {
|
|||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
disabled={props.disabled}
|
disabled={props.disabled}
|
||||||
|
type="button"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="c__select__inner__value">
|
<div className="c__select__inner__value">
|
||||||
|
|||||||
Reference in New Issue
Block a user