@devtron-labs/devtron-fe-common-lib 0.0.7-beta-9 → 0.0.7-beta-10

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/dist/index.js CHANGED
@@ -8687,11 +8687,12 @@ var TagLabelValueSelector = function (_a) {
8687
8687
  }
8688
8688
  return renderValidationsSuggestions();
8689
8689
  };
8690
+ var popupMenuBody = activeElement === "tag-".concat(tagInputType, "-").concat(selectedTagIndex) ? renderSuggestions() : null;
8690
8691
  return (jsxRuntime.jsxs(PopupMenu, __assign({ autoClose: true, autoPosition: true }, { children: [jsxRuntime.jsx(PopupMenu.Button, __assign({ rootClassName: "dc__bg-n50 flex top dc__no-border-imp" }, { children: jsxRuntime.jsx(ResizableTagTextArea, { minHeight: 30, maxHeight: 80, className: "form__input pt-4-imp pb-4-imp fs-13 ".concat(tagInputType === exports.KEY_VALUE.KEY
8691
8692
  ? "dc__no-right-radius"
8692
8693
  : "dc__no-border-radius dc__no-right-border dc__no-left-border", " ").concat(tagData[tagInputType === exports.KEY_VALUE.KEY ? 'isInvalidKey' : 'isInvalidValue']
8693
8694
  ? 'form__input--error'
8694
- : ''), value: selectedValue, onChange: handleInputChange, onBlur: handleOnBlur, onFocus: handleOnFocus, placeholder: placeholder, tabIndex: tabIndex, refVar: refVar, dependentRef: dependentRef }) })), jsxRuntime.jsx(PopupMenu.Body, __assign({ rootClassName: "mxh-210 dc__overflow-auto tag-".concat(selectedTagIndex, "-class"), autoWidth: true, preventWheelDisable: true }, { children: activeElement === "tag-".concat(tagInputType, "-").concat(selectedTagIndex) && renderSuggestions() }))] })));
8695
+ : ''), value: selectedValue, onChange: handleInputChange, onBlur: handleOnBlur, onFocus: handleOnFocus, placeholder: placeholder, tabIndex: tabIndex, refVar: refVar, dependentRef: dependentRef }) })), popupMenuBody && (jsxRuntime.jsx(PopupMenu.Body, __assign({ rootClassName: "mxh-210 dc__overflow-auto tag-".concat(selectedTagIndex, "-class"), autoWidth: true, preventWheelDisable: true }, { children: popupMenuBody })))] })));
8695
8696
  };
8696
8697
 
8697
8698
  var TagDetails = function (_a) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.7-beta-9",
3
+ "version": "0.0.7-beta-10",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -125,6 +125,7 @@ export const TagLabelValueSelector = ({
125
125
  return renderValidationsSuggestions()
126
126
  }
127
127
 
128
+ const popupMenuBody = activeElement === `tag-${tagInputType}-${selectedTagIndex}` ? renderSuggestions() : null
128
129
  return (
129
130
  <PopupMenu autoClose autoPosition>
130
131
  <PopupMenu.Button rootClassName="dc__bg-n50 flex top dc__no-border-imp">
@@ -150,13 +151,15 @@ export const TagLabelValueSelector = ({
150
151
  dependentRef={dependentRef}
151
152
  />
152
153
  </PopupMenu.Button>
153
- <PopupMenu.Body
154
- rootClassName={`mxh-210 dc__overflow-auto tag-${selectedTagIndex}-class`}
155
- autoWidth={true}
156
- preventWheelDisable={true}
157
- >
158
- {activeElement === `tag-${tagInputType}-${selectedTagIndex}` && renderSuggestions()}
159
- </PopupMenu.Body>
154
+ {popupMenuBody && (
155
+ <PopupMenu.Body
156
+ rootClassName={`mxh-210 dc__overflow-auto tag-${selectedTagIndex}-class`}
157
+ autoWidth={true}
158
+ preventWheelDisable={true}
159
+ >
160
+ {popupMenuBody}
161
+ </PopupMenu.Body>
162
+ )}
160
163
  </PopupMenu>
161
164
  )
162
165
  }