@capillarytech/creatives-library 7.17.112 → 7.17.113
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -358,9 +358,14 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
358
358
|
name: this.state.searchText,
|
|
359
359
|
sortBy: this.state.sortBy,
|
|
360
360
|
};
|
|
361
|
-
const { totalCount: nextPropsTotalTemplatesCount } = nextProps?.TemplatesList?.[0] || {};
|
|
362
361
|
const { totalCount: propsTotalTemplatesCount } = this.props?.TemplatesList?.[0] || {};
|
|
362
|
+
let nextPropsTotalTemplatesCount;
|
|
363
|
+
if(get(nextProps,'route.name').toLowerCase() === ZALO_LOWERCASE){
|
|
363
364
|
|
|
365
|
+
nextPropsTotalTemplatesCount = (nextProps?.TemplatesList|| [])?.length;
|
|
366
|
+
} else {
|
|
367
|
+
nextPropsTotalTemplatesCount = (nextProps?.TemplatesList?.[0] || {})?.totalCount;
|
|
368
|
+
}
|
|
364
369
|
if (nextPropsTotalTemplatesCount && nextPropsTotalTemplatesCount !== propsTotalTemplatesCount) {
|
|
365
370
|
this.setState({ templatesCount: nextPropsTotalTemplatesCount });
|
|
366
371
|
}
|