mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-02 02:30:29 +00:00
Update select props
This commit is contained in:
@@ -21,6 +21,7 @@ type SelectProps = {
|
|||||||
label?: string;
|
label?: string;
|
||||||
fullWidth?: boolean;
|
fullWidth?: boolean;
|
||||||
onChange: (event: React.ChangeEvent<HTMLSelectElement>) => void;
|
onChange: (event: React.ChangeEvent<HTMLSelectElement>) => void;
|
||||||
|
onBlur?: (event: React.FocusEvent<HTMLSelectElement>) => void;
|
||||||
};
|
};
|
||||||
|
|
||||||
const Select = ({
|
const Select = ({
|
||||||
@@ -30,6 +31,7 @@ const Select = ({
|
|||||||
value,
|
value,
|
||||||
options,
|
options,
|
||||||
onChange,
|
onChange,
|
||||||
|
onBlur,
|
||||||
error,
|
error,
|
||||||
errorMessage,
|
errorMessage,
|
||||||
...props
|
...props
|
||||||
@@ -50,7 +52,7 @@ const Select = ({
|
|||||||
</div>
|
</div>
|
||||||
<div className='select'>
|
<div className='select'>
|
||||||
<div>
|
<div>
|
||||||
<select value={value} name={name} onChange={onChange}>
|
<select value={value} name={name} onChange={onChange} onBlur={onBlur}>
|
||||||
{options.map((option) => (
|
{options.map((option) => (
|
||||||
<option key={value} value={option.value}>
|
<option key={value} value={option.value}>
|
||||||
{option.label}
|
{option.label}
|
||||||
|
|||||||
Reference in New Issue
Block a user