Skip to content

Commit

Permalink
make numberOptions optional
Browse files Browse the repository at this point in the history
  • Loading branch information
fkomlo committed Jan 27, 2025
1 parent 7c318ab commit 9637bb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/filterform/FilterInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type SelectValueInputConfig = {
type NumberValueInputConfig = {
type: 'number'
inputCount: number
numberOptions: { max: number; min: number; step: number }
numberOptions?: { max: number; min: number; step: number }
}

type TextValueInputConfig = {
Expand Down Expand Up @@ -167,7 +167,7 @@ const ValueInput = ({
value={values?.[index]}
className="basis-1/2"
size={size}
{...valueInputConfig.numberOptions}
{...(valueInputConfig.numberOptions ?? {})}
/>
</React.Fragment>
)
Expand Down
2 changes: 1 addition & 1 deletion src/components/filterform/useFilterField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ type SelectValueInputConfig = {
type NumberValueInputConfig = {
type: 'number'
inputCount: number
numberOptions: { max: number; min: number; step: number }
numberOptions?: { max: number; min: number; step: number }
}

type TextValueInputConfig = {
Expand Down

0 comments on commit 9637bb8

Please sign in to comment.