Skip to content

Commit

Permalink
fix: the isNot operator for filtering the date field is adapted for s…
Browse files Browse the repository at this point in the history
…qlite
  • Loading branch information
Sky-FE committed Jun 7, 2024
1 parent c2c3ad3 commit a31053b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,7 @@ export abstract class AbstractFilterQuery implements IFilterQueryInterface {
private shouldKeepFilterItem(value: unknown, field: IFieldInstance, operator: string): boolean {
return (
value !== null ||
field.type === FieldType.Checkbox ||
(field.type === FieldType.Formula && field.cellValueType === CellValueType.Boolean) ||
field.cellValueType === CellValueType.Boolean ||
([isEmpty.value, isNotEmpty.value] as string[]).includes(operator)
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export class DatetimeCellValueFilterAdapter extends CellValueFilterSqlite {
const { options } = this.field;

const dateTimeRange = this.getFilterDateTimeRange(options as IDateFieldOptions, value);
builderClient.whereNotBetween(this.tableColumnRef, dateTimeRange);
builderClient
.whereNotBetween(this.tableColumnRef, dateTimeRange)
.orWhereNull(this.tableColumnRef);
return builderClient;
}

Expand Down

0 comments on commit a31053b

Please sign in to comment.