fix(smartTable): fixed filtering with an intermediate check
gitea/salix/pipeline/head There was a failure building this commit Details

Refs: #5177
This commit is contained in:
Joan Sanchez 2023-03-07 07:47:30 +01:00
parent 6e984d8527
commit c0ff6bea57
2 changed files with 4 additions and 3 deletions

View File

@ -40,7 +40,7 @@ export default class Check extends Toggle {
set tripleState(value) {
this._tripleState = value;
this.field = this.field;
this.field = value;
}
get tripleState() {

View File

@ -436,6 +436,7 @@ export default class SmartTable extends Component {
if (filters && filters.userFilter)
this.model.userFilter = filters.userFilter;
this.addFilter(field, this.$inputsScope.searchProps[field]);
}
@ -451,7 +452,7 @@ export default class SmartTable extends Component {
}
addFilter(field, value) {
if (value == '') value = null;
if (value === '') value = null;
let stateFilter = {tableQ: {}};
if (this.$params.q) {
@ -462,7 +463,7 @@ export default class SmartTable extends Component {
}
const whereParams = {[field]: value};
if (value) {
if (value !== '' && value !== null && value !== undefined) {
let where = {[field]: value};
if (this.exprBuilder) {
where = buildFilter(whereParams, (param, value) =>