@capillarytech/creatives-library 8.0.340 → 8.0.342

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@capillarytech/creatives-library",
3
3
  "author": "meharaj",
4
- "version": "8.0.340",
4
+ "version": "8.0.342",
5
5
  "description": "Capillary creatives ui",
6
6
  "main": "./index.js",
7
7
  "module": "./index.es.js",
@@ -80,7 +80,7 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
80
80
 
81
81
  componentDidUpdate(prevProps, prevState) {
82
82
  if (this.props.tags !== prevProps.tags || this.state.searchValue !== prevState.searchValue) {
83
- const temp = this.renderTags(this.props.tags, this.state.searchValue);
83
+ const temp = this.renderTags(this.props.tags);
84
84
  this.setState({
85
85
  tagsList: temp,
86
86
  });
@@ -135,14 +135,13 @@ class CapTagList extends React.Component { // eslint-disable-line react/prefer-s
135
135
  const tagNameWithoutUnderscore = tagName.replace(/_/g, " ");
136
136
  const searchStringLower = _.toLower(value);
137
137
  if (_.has(val, "subtags")) {
138
- if (
139
- val?.name
138
+ const temp = this.getSearchedExpandedKeys(val?.subtags, value, nodeKey);
139
+ const nodeMatches = val?.name
140
140
  && (tagName.includes(searchStringLower)
141
- || tagNameWithoutUnderscore.includes(searchStringLower))
142
- ) {
141
+ || tagNameWithoutUnderscore.includes(searchStringLower));
142
+ if (nodeMatches || temp.length > 0) {
143
143
  list.push(nodeKey);
144
144
  }
145
- const temp = this.getSearchedExpandedKeys(val?.subtags, value, nodeKey);
146
145
  list = list.concat(temp);
147
146
  } else if (
148
147
  val?.name