Skip to content

Commit 907d07e

Browse files
committed
fix: Allow filtering by seat count with values starting with 0 (e.g., 0010 → 10)
1 parent 1063726 commit 907d07e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/components/ui/filter-input.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import React from 'react'
21
import { Input } from '@/components/ui/input'
32
import { Label } from '@/components/ui/label'
43
import { cn } from '@/lib/utils'
54
import { t } from 'i18next'
5+
import { memo } from 'react'
66

77
interface FilterInputProps {
88
id: string
@@ -15,7 +15,7 @@ interface FilterInputProps {
1515
hideNumberSpinner?: boolean
1616
}
1717

18-
const FilterInput: React.FC<FilterInputProps> = React.memo(
18+
const FilterInput: React.FC<FilterInputProps> = memo(
1919
({
2020
id,
2121
label,
@@ -48,7 +48,7 @@ const FilterInput: React.FC<FilterInputProps> = React.memo(
4848

4949
if (id === 'seatingCount' && type === 'number') {
5050
const numValue = parseInt(newValue, 10)
51-
if (newValue && (isNaN(numValue) || numValue < 1 || numValue > 999)) {
51+
if (newValue && (isNaN(numValue) || numValue < 0 || numValue > 999)) {
5252
return
5353
}
5454
}

0 commit comments

Comments
 (0)