[SSE] Edit code filter

This commit is contained in:
ShimaginAndrey 2021-09-09 19:32:41 +03:00
parent 3a4c4b1316
commit a416d583fa
2 changed files with 3 additions and 4 deletions

View file

@ -11,7 +11,7 @@ const FilterOptionsController = () => {
const [configFilter, setConfig] = useState(null);
const [listVal, setListValue] = useState([]);
const [isValid, setIsValid] = useState(null);
const [checkSort, setCheckSort] = useState(null);
const [checkSort, setCheckSort] = useState('');
useEffect(() => {
function onDocumentReady() {
@ -35,8 +35,7 @@ const FilterOptionsController = () => {
const onApiFilterOptions= (config) => {
setDataFilterCells(config);
setConfig(config);
setClearDisable(config);
setCheckSort((config.asc_getSortState() === Asc.c_oAscSortOptions.Ascending ? 'down' : '') ||
(config.asc_getSortState() === Asc.c_oAscSortOptions.Descending ? 'up' : ''));

View file

@ -55,7 +55,7 @@ const FilterOptions = (props) => {
</List>
<List >
<ListButton color="black" className={props.isValid ? 'disabled' : ''} onClick={HandleClearFilter}>{_t.textClearFilter}</ListButton>
<ListButton color="black" className={props.isValid || is_all_checked ? 'disabled' : ''} onClick={HandleClearFilter}>{_t.textClearFilter}</ListButton>
<ListButton color="red" onClick={() => props.onDeleteFilter()} id="btn-delete-filter">{_t.textDeleteFilter}</ListButton>
</List>
<List>