filter fix

This commit is contained in:
Jan Prochazka 2021-11-29 22:41:25 +01:00
parent c546987fbf
commit 7edb397741
2 changed files with 5 additions and 4 deletions

View File

@ -253,6 +253,7 @@ const createParser = (filterType: FilterType) => {
eq: r => word('=').then(r.value).map(binaryCondition('=')),
ne: r => word('!=').then(r.value).map(binaryCondition('<>')),
ne2: r => word('<>').then(r.value).map(binaryCondition('<>')),
lt: r => word('<').then(r.value).map(binaryCondition('<')),
gt: r => word('>').then(r.value).map(binaryCondition('>')),
le: r => word('<=').then(r.value).map(binaryCondition('<=')),
@ -273,7 +274,7 @@ const createParser = (filterType: FilterType) => {
if (filterType == 'string') allowedValues.push('string1', 'string2', 'noQuotedString');
if (filterType == 'number') allowedValues.push('string1Num', 'string2Num', 'number');
const allowedElements = ['null', 'notNull', 'eq', 'ne'];
const allowedElements = ['null', 'notNull', 'eq', 'ne', 'ne2'];
if (filterType == 'number' || filterType == 'datetime') allowedElements.push('lt', 'gt', 'le', 'ge');
if (filterType == 'string')
allowedElements.push(

View File

@ -58,7 +58,7 @@
{ onClick: () => setFilter(''), text: 'Clear Filter' },
{ onClick: () => filterMultipleValues(), text: 'Filter multiple values' },
{ onClick: () => openFilterWindow('='), text: 'Equals...' },
{ onClick: () => openFilterWindow('['), text: 'Does Not Equal...' },
{ onClick: () => openFilterWindow('<>'), text: 'Does Not Equal...' },
{ onClick: () => setFilter('NULL'), text: 'Is Null' },
{ onClick: () => setFilter('NOT NULL'), text: 'Is Not Null' },
{ onClick: () => openFilterWindow('>'), text: 'Greater Than...' },
@ -122,7 +122,7 @@
{ onClick: () => filterMultipleValues(), text: 'Filter multiple values' },
{ onClick: () => openFilterWindow('='), text: 'Equals...' },
{ onClick: () => openFilterWindow('['), text: 'Does Not Equal...' },
{ onClick: () => openFilterWindow('<>'), text: 'Does Not Equal...' },
{ onClick: () => setFilter('NULL'), text: 'Is Null' },
{ onClick: () => setFilter('NOT NULL'), text: 'Is Not Null' },
{ onClick: () => setFilter('EMPTY, NULL'), text: 'Is Empty Or Null' },
@ -142,7 +142,7 @@
{ onClick: () => setFilter(''), text: 'Clear Filter' },
{ onClick: () => filterMultipleValues(), text: 'Filter multiple values' },
{ onClick: () => openFilterWindow('='), text: 'Equals...' },
{ onClick: () => openFilterWindow('['), text: 'Does Not Equal...' },
{ onClick: () => openFilterWindow('<>'), text: 'Does Not Equal...' },
{ onClick: () => setFilter('EXISTS'), text: 'Field exists' },
{ onClick: () => setFilter('NOT EXISTS'), text: 'Field does not exist' },
{ onClick: () => openFilterWindow('>'), text: 'Greater Than...' },