Skip to content

Commit fdeb12d

Browse files
committed
Update default text field type and story
1 parent 36a4a37 commit fdeb12d

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

packages/dataviews/src/components/dataviews/stories/fixtures.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,9 @@ export const fields: Field< SpaceObject >[] = [
652652
type: 'text',
653653
enableHiding: false,
654654
enableGlobalSearch: true,
655+
filterBy: {
656+
operators: [ 'contains', 'notContains', 'startsWith' ],
657+
},
655658
},
656659
{
657660
id: 'date',

packages/dataviews/src/field-types/text.tsx

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,7 @@ import type {
88
Operator,
99
} from '../types';
1010
import { renderFromElements } from '../utils';
11-
import {
12-
OPERATOR_IS_ANY,
13-
OPERATOR_IS_NONE,
14-
OPERATOR_CONTAINS,
15-
OPERATOR_NOT_CONTAINS,
16-
OPERATOR_STARTS_WITH,
17-
} from '../constants';
11+
import { OPERATOR_IS_ANY, OPERATOR_IS_NONE } from '../constants';
1812

1913
function sort( valueA: any, valueB: any, direction: SortDirection ) {
2014
return direction === 'asc'
@@ -33,11 +27,7 @@ function isValid( value: any, context?: ValidationContext ) {
3327
return true;
3428
}
3529

36-
const operators: Operator[] = [
37-
OPERATOR_CONTAINS,
38-
OPERATOR_NOT_CONTAINS,
39-
OPERATOR_STARTS_WITH,
40-
];
30+
const operators: Operator[] = [ OPERATOR_IS_ANY, OPERATOR_IS_NONE ];
4131

4232
export default {
4333
sort,

0 commit comments

Comments
 (0)