Commit ae6d0b98 authored by Oleksii Savran's avatar Oleksii Savran

Fix: Updated BooleanArrFilter UI for default value

-changed "Not provided" checkbox behaviour
parent d5faae2e
......@@ -63,7 +63,7 @@ class BooleanArrCheckbox extends React.Component<IBooleanArrCheckbox> {
return option === 'NULL';
}
return input.value === option;
return input.value === option || typeof input.value === 'string';
}
}
......
......@@ -75,7 +75,7 @@ class BooleanArrFilter extends React.Component<IBooleanArrFilter, any> {
}
private handleChange = (input, value) => {
const { isNotNull, notNull } = this.props;
const { isNotNull, notNull, isNull } = this.props;
if (notNull) {
// notNull case
......@@ -90,7 +90,25 @@ class BooleanArrFilter extends React.Component<IBooleanArrFilter, any> {
}
} else {
// notNull === false case
if (value === 'NULL') {
if (value === input.value) {
this.setState({nullChecked: false, notNullChecked: false});
input.onChange('');
return;
}
if (value === 'NULL' && input.value === '') {
if (isNotNull) {
this.setState({nullChecked: false, notNullChecked: false});
input.onChange('');
return;
}
this.setState({nullChecked: false, notNullChecked: true});
input.onChange('');
return;
}
if (value === 'NULL' && !isNull) {
this.setState({nullChecked: true, notNullChecked: false});
input.onChange('');
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment