[SSE mobile] Fix Bug 53765

This commit is contained in:
SergeyEzhin 2021-11-16 19:07:52 +04:00
parent b0ec722fd0
commit 846ffffa38
2 changed files with 7 additions and 3 deletions

View file

@ -4,8 +4,9 @@ import { f7,Sheet,Popover } from 'framework7-react';
import { Device } from '../../../../common/mobile/utils/device';
import { useTranslation } from 'react-i18next';
const FilterOptionsController = memo( () => {
const FilterOptionsController = memo(props => {
const { t } = useTranslation();
const wsProps = props.wsProps;
const _t = t('View.Edit', {returnObjects: true});
const configRef = useRef();
@ -32,9 +33,12 @@ const FilterOptionsController = memo( () => {
}
}, []);
const onApiFilterOptions= (config) => {
const onApiFilterOptions = (config) => {
setDataFilterCells(config);
configRef.current = config;
if (wsProps.PivotTables && config.asc_getPivotObj() ||
wsProps.AutoFilter && !config.asc_getPivotObj()) return;
setCheckSort((config.asc_getSortState() === Asc.c_oAscSortOptions.Ascending ? 'down' : '') ||
(config.asc_getSortState() === Asc.c_oAscSortOptions.Descending ? 'up' : ''));

View file

@ -135,7 +135,7 @@ class MainPage extends Component {
{appOptions.isDocReady &&
<Fragment key='filter-context'>
<FilterOptionsController />
<FilterOptionsController wsProps={wsProps} />
<ContextMenu openOptions={this.handleClickToOpenOptions.bind(this)} />
</Fragment>
}