mirror of
https://github.com/oceanprotocol/market.git
synced 2024-12-02 05:57:29 +01:00
select empty value tweak
This commit is contained in:
parent
0f6d5ffe62
commit
c867253dd9
@ -11,7 +11,7 @@ const DefaultInput = (props: InputProps) => (
|
||||
)
|
||||
|
||||
export default function InputElement(props: InputProps): ReactElement {
|
||||
const { type, options, name, prefix, postfix, small } = props
|
||||
const { type, options, name, prefix, postfix, small, field } = props
|
||||
|
||||
switch (type) {
|
||||
case 'select':
|
||||
@ -21,7 +21,9 @@ export default function InputElement(props: InputProps): ReactElement {
|
||||
className={`${styles.select} ${small && styles.selectSmall}`}
|
||||
{...props}
|
||||
>
|
||||
<option value="">---</option>
|
||||
{field !== undefined && field.value === '' && (
|
||||
<option value="">---</option>
|
||||
)}
|
||||
{options &&
|
||||
options
|
||||
.sort((a: string, b: string) => a.localeCompare(b))
|
||||
|
Loading…
Reference in New Issue
Block a user