diff --git a/apps/documenteditor/mobile/src/view/add/Add.jsx b/apps/documenteditor/mobile/src/view/add/Add.jsx
index 26a48ac4f..535cd9e48 100644
--- a/apps/documenteditor/mobile/src/view/add/Add.jsx
+++ b/apps/documenteditor/mobile/src/view/add/Add.jsx
@@ -185,8 +185,9 @@ const AddTabs = inject("storeFocusObjects", "storeTableSettings")(observer(({sto
const onGetTableStylesPreviews = () => {
const api = Common.EditorApi.get();
if(storeTableSettings.isRenderStyles) {
+ $$('.table-styles').hide();
f7.preloader.showIn('.preload');
- setTimeout( () => storeTableSettings.setStyles(api.asc_getTableStylesPreviews()), 10);
+ setTimeout( () => storeTableSettings.setStyles(api.asc_getTableStylesPreviews(true)), 10);
storeTableSettings.resetFlagRender(false);
}
}
diff --git a/apps/documenteditor/mobile/src/view/add/AddTable.jsx b/apps/documenteditor/mobile/src/view/add/AddTable.jsx
index 84a84790e..5b97ad610 100644
--- a/apps/documenteditor/mobile/src/view/add/AddTable.jsx
+++ b/apps/documenteditor/mobile/src/view/add/AddTable.jsx
@@ -12,6 +12,7 @@ const AddTable = props => {
const onReadyStyles = () => {
f7.preloader.hideIn('.preload');
+ $$('.table-styles').show();
}
return (
diff --git a/apps/documenteditor/mobile/src/view/edit/EditTable.jsx b/apps/documenteditor/mobile/src/view/edit/EditTable.jsx
index d42edf860..070c436a4 100644
--- a/apps/documenteditor/mobile/src/view/edit/EditTable.jsx
+++ b/apps/documenteditor/mobile/src/view/edit/EditTable.jsx
@@ -180,10 +180,10 @@ const StyleTemplates = inject("storeFocusObjects","storeTableSettings")(observer
const styles = storeTableSettings.arrayStyles;
useEffect(() => {
- if (storeTableSettings.isRenderStyles) onGetTableStylesPreviews();
- return () => {
+ if (storeTableSettings.isRenderStyles) {
+ onGetTableStylesPreviews();
storeTableSettings.resetFlagRender(false);
- }
+ }
}, []);
return (
@@ -224,12 +224,11 @@ const PageStyleOptions = props => {
nextStateRef.current = [isFirstRow, isLastRow, isBandHor, isFirstCol, isLastCol, isBandVer];
useEffect(() => {
- props.storeTableSettings.resetFlagRender(false);
prevStateRef.current = [...nextStateRef.current];
return () => {
if (!(prevStateRef.current.every((item, index) => item === nextStateRef.current[index]))) {
- props.onGetTableStylesPreviews();
+ props.storeTableSettings.resetFlagRender(true);
}
}
}, []);
@@ -238,6 +237,7 @@ const PageStyleOptions = props => {
if ( !(prevStateRef.current.every((item, index) => item === nextStateRef.current[index]))) {
$$('.table-styles').hide();
f7.preloader.showIn('.preload');
+ props.onGetTableStylesPreviews();
}
}
diff --git a/apps/presentationeditor/mobile/src/controller/add/AddOther.jsx b/apps/presentationeditor/mobile/src/controller/add/AddOther.jsx
index cf11ca69c..a7097e60b 100644
--- a/apps/presentationeditor/mobile/src/controller/add/AddOther.jsx
+++ b/apps/presentationeditor/mobile/src/controller/add/AddOther.jsx
@@ -95,8 +95,9 @@ class AddOtherController extends Component {
onGetTableStylesPreviews = () => {
const api = Common.EditorApi.get();
if (this.props.storeTableSettings.isRenderStyles) {
+ $$('.table-styles').hide();
f7.preloader.showIn('.preload');
- setTimeout(() => this.props.storeTableSettings.setStyles(api.asc_getTableStylesPreviews()) , 10);
+ setTimeout(() => this.props.storeTableSettings.setStyles(api.asc_getTableStylesPreviews(true)) , 10);
this.props.storeTableSettings.resetFlagRender(false);
}
}
diff --git a/apps/presentationeditor/mobile/src/view/add/AddOther.jsx b/apps/presentationeditor/mobile/src/view/add/AddOther.jsx
index f46de1649..77fd2f028 100644
--- a/apps/presentationeditor/mobile/src/view/add/AddOther.jsx
+++ b/apps/presentationeditor/mobile/src/view/add/AddOther.jsx
@@ -13,6 +13,7 @@ const PageTable = props => {
const onReadyStyles = () => {
f7.preloader.hideIn('.preload');
+ $$('.table-styles').show();
}
return (
diff --git a/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx b/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx
index 0687845ae..69838bc8e 100644
--- a/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx
+++ b/apps/presentationeditor/mobile/src/view/edit/EditTable.jsx
@@ -14,10 +14,10 @@ const StyleTemplates = inject("storeFocusObjects","storeTableSettings")(observer
const styles = storeTableSettings.arrayStyles;
useEffect(() => {
- if (storeTableSettings.isRenderStyles) onGetTableStylesPreviews();
- return () => {
+ if (storeTableSettings.isRenderStyles) {
+ onGetTableStylesPreviews();
storeTableSettings.resetFlagRender(false);
- }
+ }
}, []);
if (!tableObject && Device.phone) {
@@ -64,12 +64,11 @@ const PageStyleOptions = props => {
nextStateRef.current = [isFirstRow, isLastRow, isBandHor, isFirstCol, isLastCol, isBandVer];
useEffect(() => {
- props.storeTableSettings.resetFlagRender(false);
prevStateRef.current = [...nextStateRef.current];
return () => {
if (!(prevStateRef.current.every((item, index) => item === nextStateRef.current[index]))) {
- props.onGetTableStylesPreviews();
+ props.storeTableSettings.resetFlagRender(true);
}
}
}, []);
@@ -78,6 +77,7 @@ const PageStyleOptions = props => {
if ( !(prevStateRef.current.every((item, index) => item === nextStateRef.current[index]))) {
$$('.table-styles').hide();
f7.preloader.showIn('.preload');
+ props.onGetTableStylesPreviews();
}
}