@capillarytech/creatives-library 7.9.3 → 7.9.5
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
|
@@ -240,8 +240,12 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
240
240
|
name: this.state.searchText,
|
|
241
241
|
sortBy: this.state.sortBy,
|
|
242
242
|
};
|
|
243
|
-
|
|
244
|
-
|
|
243
|
+
const { totalCount: nextPropsTotalTemplatesCount } = nextProps?.TemplatesList?.[0] || {};
|
|
244
|
+
const { totalCount: propsTotalTemplatesCount } = this.props?.TemplatesList?.[0] || {};
|
|
245
|
+
const { templatesCount } = this.state || {};
|
|
246
|
+
|
|
247
|
+
if (nextPropsTotalTemplatesCount && nextPropsTotalTemplatesCount !== propsTotalTemplatesCount && templatesCount === 0) {
|
|
248
|
+
this.setState({ templatesCount: nextPropsTotalTemplatesCount });
|
|
245
249
|
}
|
|
246
250
|
if (!isEqual(nextProps.route.name, this.props.route.name)) {
|
|
247
251
|
let channel = '';
|
|
@@ -2028,6 +2032,7 @@ export class Templates extends React.Component { // eslint-disable-line react/pr
|
|
|
2028
2032
|
onChange={(e) => this.searchTemplate(e.target.value)}
|
|
2029
2033
|
disabled={this.checkSearchDisabled()}
|
|
2030
2034
|
onClear={() => this.searchTemplate('')}
|
|
2035
|
+
onScroll={(e) => e.stopPropagation()}
|
|
2031
2036
|
/>}
|
|
2032
2037
|
{
|
|
2033
2038
|
channel.toUpperCase() === WECHAT && <CapRadio.CapRadioGroup className="wechat-filters" defaultValue={wechatFilter} onChange={this.setWechatFilter}>
|