{
- setFormData(
- isChecked ? { types: ['project', 'node_modules'] } : { types: ['project'] }
- );
- }}
+ defaultChecked={filters.modules.includes('node_modules')}
+ name="filterNodeModules"
+ onCheckedChange={onModuleChange}
/>
@@ -85,11 +108,9 @@ export function StatsModuleFilter() {
type="text"
className="mt-2"
placeholder="e.g. app/**/*.{ts}"
- value={formData.include}
- onChange={(event) => setFormData({ include: event.currentTarget.value })}
- onKeyDown={(event) =>
- onInputEnter(event, (data) => ({ ...data, include: event.currentTarget.value }))
- }
+ defaultValue={filters.include}
+ onChange={(event) => onIncludeChange(event.currentTarget.value)}
+ onKeyDown={onInputEnter}
/>
@@ -103,24 +124,30 @@ export function StatsModuleFilter() {
type="text"
className="mt-2"
placeholder="e.g. react-native/**"
- value={formData.exclude}
- onChange={(event) => setFormData({ exclude: event.currentTarget.value })}
- onKeyDown={(event) =>
- onInputEnter(event, (data) => ({ ...data, exclude: event.currentTarget.value }))
- }
+ defaultValue={filters.exclude}
+ onChange={(event) => onExcludeChange(event.currentTarget.value)}
+ onKeyDown={onInputEnter}
/>
-
-
-
-
-