mirror of
https://github.com/hazemKrimi/crimson-quirks-ui.git
synced 2026-05-01 18:20:28 +00:00
Update select props
This commit is contained in:
@@ -17,6 +17,7 @@ type SelectProps = {
|
|||||||
errorMessage?: string;
|
errorMessage?: string;
|
||||||
options: Array<{ value: any; label: string }>;
|
options: Array<{ value: any; label: string }>;
|
||||||
value: string;
|
value: string;
|
||||||
|
select?: any;
|
||||||
name: string;
|
name: string;
|
||||||
label?: string;
|
label?: string;
|
||||||
fullWidth?: boolean;
|
fullWidth?: boolean;
|
||||||
@@ -29,6 +30,7 @@ const Select = ({
|
|||||||
label,
|
label,
|
||||||
name,
|
name,
|
||||||
value,
|
value,
|
||||||
|
select = null,
|
||||||
options,
|
options,
|
||||||
onChange,
|
onChange,
|
||||||
onBlur,
|
onBlur,
|
||||||
@@ -52,9 +54,14 @@ const Select = ({
|
|||||||
</div>
|
</div>
|
||||||
<div className='select'>
|
<div className='select'>
|
||||||
<div>
|
<div>
|
||||||
<select value={value} name={name} onChange={onChange} onBlur={onBlur}>
|
<select
|
||||||
{options.map((option) => (
|
value={select || value}
|
||||||
<option key={value} value={option.value}>
|
name={name}
|
||||||
|
onChange={onChange}
|
||||||
|
onBlur={onBlur}
|
||||||
|
>
|
||||||
|
{options.map((option, index) => (
|
||||||
|
<option key={index} value={option.value}>
|
||||||
{option.label}
|
{option.label}
|
||||||
</option>
|
</option>
|
||||||
))}
|
))}
|
||||||
|
|||||||
Reference in New Issue
Block a user