You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Defaults to true, when enabled it will parse the filter input string and extract filter operator (<, <=, >=, >, =, *) when found.
42
+
* When an operators is found in the input string, it will automatically be converted to a Filter Operators and will no longer be part of the search value itself.
43
+
* For example when the input value is "> 100", it will transform the search as to a Filter Operator of ">" and a search value of "100".
44
+
* The only time that the user would want to disable this flag is when the user's data has any of these special characters and the user really wants to filter them as part of the string (ie: >, <, ...)
45
+
*/
46
+
autoParseInputFilterOperator?: boolean;
47
+
40
48
/** optional Behavior of a column with action, for example it's used by the Row Move Manager Plugin */
Copy file name to clipboardExpand all lines: packages/common/src/interfaces/gridOption.interface.ts
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -78,6 +78,14 @@ export interface GridOption {
78
78
*/
79
79
autoFitColumnsOnFirstLoad?: boolean;
80
80
81
+
/**
82
+
* Defaults to true, when enabled it will parse the filter input string and extract filter operator (<, <=, >=, >, =, *) when found.
83
+
* When an operators is found in the input string, it will automatically be converted to a Filter Operators and will no longer be part of the search value itself.
84
+
* For example when the input value is "> 100", it will transform the search as to a Filter Operator of ">" and a search value of "100".
85
+
* The only time that the user would want to disable this flag is when the user's data has any of these special characters and the user really wants to filter them as part of the string (ie: >, <, ...)
86
+
*/
87
+
autoParseInputFilterOperator?: boolean;
88
+
81
89
/**
82
90
* Defaults to false, which leads to automatically adjust the width of each column by their cell value content and only on first page/component load.
83
91
* If you wish this resize to also re-evaluate when resizing the browser, then you should also use `enableAutoResizeColumnsByCellContent`
it('should return False when input value has special char "*" substring but "autoParseInputFilterOperator" is set to false so the text "Jo*" will not be found',()=>{
it('should return False when input value from datacontext contains an operator >= and its value is greater than 10 substring but "autoParseInputFilterOperator" is set to false',()=>{
? fieldSearchValue.match(/^([<>!=\*]{0,2})(.*[^<>!=\*])?([\*]?)$/)// group 1: Operator, 2: searchValue, 3: last char is '*' (meaning starts with, ex.: abc*)
404
+
: [fieldSearchValue,'',fieldSearchValue,''];// when parsing is disabled, we'll only keep the search value in the index 2 to make it easy for code reuse
it('should return a query with search having the operator StartsWith even when search value last char is * symbol but the operator provided is *z',()=>{
789
+
it('should return a query with search having the operator StartsWith even when search value last char is "*" symbol but the operator provided is "*z"',()=>{
it('should return a query with search NOT having the operator Greater of Equal when the search value was provided as ">=10" but "autoParseInputFilterOperator" is set to false',()=>{
it('should return a query with search having a range of exclusive numbers when the search value contains 2 dots (..) to represent a range of numbers',()=>{
? fieldSearchValue.match(/^([<>!=\*]{0,2})(.*[^<>!=\*])([\*]?)$/)// group 1: Operator, 2: searchValue, 3: last char is '*' (meaning starts with, ex.: abc*)
414
+
: [fieldSearchValue,'',fieldSearchValue,''];// when parsing is disabled, we'll only keep the search value in the index 2 to make it easy for code reuse
0 commit comments