mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +02:00
Transform default number field value
- Navidrome allows for "string" number query values which will not work with the numberinput
This commit is contained in:
@@ -48,6 +48,7 @@ const QueryValueInput = ({ onChange, type, ...props }: any) => {
|
|||||||
size="sm"
|
size="sm"
|
||||||
onChange={onChange}
|
onChange={onChange}
|
||||||
{...props}
|
{...props}
|
||||||
|
defaultValue={props.defaultValue && Number(props.defaultValue)}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
case 'date':
|
case 'date':
|
||||||
@@ -64,7 +65,7 @@ const QueryValueInput = ({ onChange, type, ...props }: any) => {
|
|||||||
<>
|
<>
|
||||||
<NumberInput
|
<NumberInput
|
||||||
{...props}
|
{...props}
|
||||||
defaultValue={props.defaultValue?.[0]}
|
defaultValue={props.defaultValue && Number(props.defaultValue?.[0])}
|
||||||
maxWidth={81}
|
maxWidth={81}
|
||||||
width="10%"
|
width="10%"
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
@@ -75,7 +76,7 @@ const QueryValueInput = ({ onChange, type, ...props }: any) => {
|
|||||||
/>
|
/>
|
||||||
<NumberInput
|
<NumberInput
|
||||||
{...props}
|
{...props}
|
||||||
defaultValue={props.defaultValue?.[1]}
|
defaultValue={props.defaultValue && Number(props.defaultValue?.[1])}
|
||||||
maxWidth={81}
|
maxWidth={81}
|
||||||
width="10%"
|
width="10%"
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user