intelicoreact 0.0.98 → 0.0.99
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.
|
@@ -136,10 +136,12 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
136
136
|
setSearchValue(name);
|
|
137
137
|
};
|
|
138
138
|
|
|
139
|
-
var hightlightedText = function hightlightedText(text) {
|
|
140
|
-
|
|
139
|
+
var hightlightedText = function hightlightedText(text, postfix) {
|
|
140
|
+
var main = searchValue ? text === null || text === void 0 ? void 0 : text.replace(new RegExp(searchValue, 'i'), function (match) {
|
|
141
141
|
return "<span class=\"bg--yellow\">".concat(match, "</span>");
|
|
142
142
|
}) : text;
|
|
143
|
+
var postfixPart = postfix ? "<span class=\"dropdown__list-item-postfix\">".concat(postfix, "</span>") : '';
|
|
144
|
+
return main + postfixPart;
|
|
143
145
|
};
|
|
144
146
|
|
|
145
147
|
var depend = getDepends(modalBtnTrigger);
|
|
@@ -156,7 +158,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
156
158
|
}, /*#__PURE__*/_react.default.createElement(_reactFeather.Check, null)), /*#__PURE__*/_react.default.createElement("div", {
|
|
157
159
|
className: item.className || '',
|
|
158
160
|
dangerouslySetInnerHTML: {
|
|
159
|
-
__html: hightlightedText(item.label)
|
|
161
|
+
__html: hightlightedText(item.label, item.postfix)
|
|
160
162
|
}
|
|
161
163
|
})) : null;
|
|
162
164
|
};
|
package/package.json
CHANGED