@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
|
@@ -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
|
|
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
|
-
|
|
139
|
-
|
|
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
|