diff --git a/apps/spreadsheeteditor/mobile/locale/en.json b/apps/spreadsheeteditor/mobile/locale/en.json index 02681d4f8..bc3204506 100644 --- a/apps/spreadsheeteditor/mobile/locale/en.json +++ b/apps/spreadsheeteditor/mobile/locale/en.json @@ -412,6 +412,8 @@ "textInvalidRange": "Invalid cells range", "txtNotUrl": "This field should be a URL in the format \"http://www.example.com\"", "textFilterOptions": "Filter Options", + "txtSortLow2High": "Sort Lowest to Highest", + "txtSortHigh2Low": "Sort Highest to Lowest", "textClearFilter": "Clear Filter", "textDeleteFilter": "Delete Filter", "textSelectAll": "Select All", diff --git a/apps/spreadsheeteditor/mobile/src/controller/FilterOptions.jsx b/apps/spreadsheeteditor/mobile/src/controller/FilterOptions.jsx index 6e8b153e8..79b2e36a1 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/FilterOptions.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/FilterOptions.jsx @@ -10,7 +10,8 @@ const FilterOptionsController = () => { const [configFilter, setConfig] = useState(null); const [listVal, setListValue] = useState([]); - const [isValid, setIsValid] = useState(null) + const [isValid, setIsValid] = useState(null); + const [checkSort, setCheckSort] = useState(null); useEffect(() => { function onDocumentReady() { @@ -36,6 +37,9 @@ const FilterOptionsController = () => { setConfig(config); setClearDisable(config); + const sort = config.asc_getSortState(); + sort == Asc.c_oAscSortOptions.Ascending ? setCheckSort(true) : setCheckSort(false); + if (Device.phone) { f7.sheet.open('.picker__sheet'); } else { @@ -128,7 +132,7 @@ const FilterOptionsController = () => { }; return ( - ) }; diff --git a/apps/spreadsheeteditor/mobile/src/view/FilterOptions.jsx b/apps/spreadsheeteditor/mobile/src/view/FilterOptions.jsx index e5d307379..ffdf7ba1f 100644 --- a/apps/spreadsheeteditor/mobile/src/view/FilterOptions.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/FilterOptions.jsx @@ -6,6 +6,7 @@ import { Device } from '../../../../common/mobile/utils/device'; const FilterOptions = (props) => { const { t } = useTranslation(); const _t = t('View.Edit', {returnObjects: true}); + const isAndroid = Device.android; useEffect(() => { const is_all_checked = props.listVal.every(item => item.check); @@ -33,15 +34,18 @@ const FilterOptions = (props) => { } - - - props.onSort('sortdown')}> - - - props.onSort('sortup')}> - - - + props.onSort('sortdown')} + after={isAndroid ? : null}> + {!isAndroid ? + : null + } + + + props.onSort('sortup')} + after={isAndroid ? : null}> + {!isAndroid ? + : null + }