Skip to content

Commit 9013483

Browse files
committed
Fix types in dev constants
1 parent 46e04ac commit 9013483

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

dev/constants.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
import type { BaseOption, Field, RuleGroupType, RuleGroupTypeIC } from 'react-querybuilder';
1+
import type { Field, RuleGroupType, RuleGroupTypeIC } from 'react-querybuilder';
22
import { convertToIC, defaultOperators, generateID } from 'react-querybuilder';
33
import { musicalInstruments } from './musicalInstruments';
44

5-
const dos = defaultOperators as BaseOption[];
6-
75
export const fields: Field[] = [
86
{
97
name: 'firstName',
@@ -21,7 +19,7 @@ export const fields: Field[] = [
2119
name: 'isMusician',
2220
label: 'Is a musician',
2321
valueEditorType: 'checkbox',
24-
operators: dos.filter(op => op.name === '='),
22+
operators: defaultOperators.filter(op => op.name === '='),
2523
defaultValue: false,
2624
},
2725
{
@@ -30,20 +28,20 @@ export const fields: Field[] = [
3028
valueEditorType: 'select',
3129
values: musicalInstruments,
3230
defaultValue: 'Cowbell',
33-
operators: dos.filter(op => op.name === '=' || op.name === 'in'),
31+
operators: defaultOperators.filter(op => op.name === '=' || op.name === 'in'),
3432
},
3533
{
3634
name: 'alsoPlays',
3735
label: 'Also plays',
3836
valueEditorType: 'multiselect',
3937
values: musicalInstruments,
4038
defaultValue: 'More cowbell',
41-
operators: dos.filter(op => op.name === 'in'),
39+
operators: defaultOperators.filter(op => op.name === 'in'),
4240
},
4341
{
4442
name: 'gender',
4543
label: 'Gender',
46-
operators: dos.filter(op => op.name === '='),
44+
operators: defaultOperators.filter(op => op.name === '='),
4745
valueEditorType: 'radio',
4846
values: [
4947
{ name: 'M', label: 'Male' },

0 commit comments

Comments
 (0)