diff --git a/apps/common/mobile/lib/view/Search.jsx b/apps/common/mobile/lib/view/Search.jsx
index 1a9932d06..3d9590dd8 100644
--- a/apps/common/mobile/lib/view/Search.jsx
+++ b/apps/common/mobile/lib/view/Search.jsx
@@ -227,6 +227,8 @@ class SearchView extends Component {
this.setState({
searchQuery: value
});
+
+ this.props.onchangeSearchQuery(value);
}
changeReplaceQuery(value) {
@@ -240,7 +242,7 @@ class SearchView extends Component {
const isReplaceAll = searchOptions.isReplaceAll;
const hidden = {display: "none"};
const searchQuery = this.state.searchQuery;
- // const replaceQuery = this.state.replaceQuery;
+ const replaceQuery = this.state.replaceQuery;
const isIos = Device.ios;
const { _t } = this.props;
@@ -259,7 +261,7 @@ class SearchView extends Component {
-
{this.changeSearchQuery(e.target.value)}} />
{isIos ?
: null}
this.changeSearchQuery('')} />
@@ -267,7 +269,7 @@ class SearchView extends Component {
{/* {usereplace || isReplaceAll ? */}
{/* style={!usereplace ? hidden: null} */}
-
{this.changeReplaceQuery(e.target.value)}} />
{isIos ?
: null}
this.changeReplaceQuery('')} />
diff --git a/apps/documenteditor/mobile/src/controller/Search.jsx b/apps/documenteditor/mobile/src/controller/Search.jsx
index fc2ea6c7a..189c1ad33 100644
--- a/apps/documenteditor/mobile/src/controller/Search.jsx
+++ b/apps/documenteditor/mobile/src/controller/Search.jsx
@@ -81,7 +81,7 @@ class DESearchView extends SearchView {
super.onSearchbarShow(isshowed, bar);
const api = Common.EditorApi.get();
- if ( isshowed ) {
+ if ( isshowed && this.state.searchQuery.length ) {
const checkboxMarkResults = f7.toggle.get('.toggle-mark-results');
api.asc_selectSearchingResults(checkboxMarkResults.checked);
} else api.asc_selectSearchingResults(false);
@@ -98,12 +98,20 @@ const Search = withTranslation()(props => {
f7.popover.close('.document-menu.modal-in', false);
if (params.find && params.find.length) {
+
+ api.asc_selectSearchingResults(true);
if (!api.asc_findText(params.find, params.forward, params.caseSensitive, params.highlight) ) {
f7.dialog.alert(null, _t.textNoTextFound);
}
}
};
+ const onchangeSearchQuery = params => {
+ const api = Common.EditorApi.get();
+
+ if(params.length === 0) api.asc_selectSearchingResults(false);
+ }
+
const onReplaceQuery = params => {
const api = Common.EditorApi.get();
@@ -120,7 +128,7 @@ const Search = withTranslation()(props => {
}
}
- return
+ return
});
const SearchSettingsWithTranslation = inject("storeAppOptions")(observer(withTranslation()(SearchSettings)));
diff --git a/apps/presentationeditor/mobile/src/controller/Search.jsx b/apps/presentationeditor/mobile/src/controller/Search.jsx
index fe0064ecb..4f801755e 100644
--- a/apps/presentationeditor/mobile/src/controller/Search.jsx
+++ b/apps/presentationeditor/mobile/src/controller/Search.jsx
@@ -86,6 +86,12 @@ const Search = withTranslation()(props => {
}
};
+ const onchangeSearchQuery = params => {
+ const api = Common.EditorApi.get();
+
+ if(params.length === 0) api.asc_selectSearchingResults(false);
+ }
+
const onReplaceQuery = params => {
const api = Common.EditorApi.get();
@@ -102,7 +108,7 @@ const Search = withTranslation()(props => {
}
}
- return
+ return
});
const SearchSettingsWithTranslation = inject("storeAppOptions")(observer(withTranslation()(SearchSettings)));
diff --git a/apps/spreadsheeteditor/mobile/src/controller/Search.jsx b/apps/spreadsheeteditor/mobile/src/controller/Search.jsx
index fbdc7614f..98636215b 100644
--- a/apps/spreadsheeteditor/mobile/src/controller/Search.jsx
+++ b/apps/spreadsheeteditor/mobile/src/controller/Search.jsx
@@ -126,7 +126,7 @@ class SESearchView extends SearchView {
super.onSearchbarShow(isshowed, bar);
const api = Common.EditorApi.get();
- if ( isshowed ) {
+ if ( isshowed && this.state.searchQuery.length ) {
const checkboxMarkResults = f7.toggle.get('.toggle-mark-results');
api.asc_selectSearchingResults(checkboxMarkResults.checked);
} else api.asc_selectSearchingResults(false);
@@ -155,12 +155,20 @@ const Search = withTranslation()(props => {
options.asc_setScanByRows(searchBy);
options.asc_setLookIn(lookIn ? Asc.c_oAscFindLookIn.Formulas : Asc.c_oAscFindLookIn.Value);
+ api.asc_selectSearchingResults(true);
+
if (!api.asc_findText(options)) {
f7.dialog.alert(null, _t.textNoTextFound);
}
}
};
+ const onchangeSearchQuery = params => {
+ const api = Common.EditorApi.get();
+
+ if(params.length === 0) api.asc_selectSearchingResults(false);
+ }
+
const onReplaceQuery = params => {
const api = Common.EditorApi.get();
let lookIn = +params.lookIn === 0;
@@ -209,7 +217,7 @@ const Search = withTranslation()(props => {
}
}
- return
+ return
});
const SearchSettingsWithTranslation = inject("storeAppOptions")(observer(withTranslation()(SearchSettings)));