@devtron-labs/devtron-fe-common-lib 0.0.7-beta-17 → 0.0.7-beta-19

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
@@ -8714,11 +8714,13 @@ var TagDetails = function (_a) {
8714
8714
  var propagateTagToResource = function () {
8715
8715
  var _tagData = __assign({}, tagData);
8716
8716
  _tagData.propagate = !_tagData.propagate;
8717
+ console.log(_tagData.propagate, _tagData.value);
8717
8718
  if (_tagData.propagate) {
8718
- _tagData.isInvalidValue = !_tagData.value || _tagData.isInvalidValue;
8719
+ _tagData.isInvalidValue = _tagData.key && (!_tagData.value || _tagData.isInvalidValue);
8719
8720
  }
8720
8721
  else {
8721
- _tagData.isInvalidValue = _tagData.value ? propagateTagValueValidator(_tagData.value).isValid : false;
8722
+ _tagData.isInvalidValue =
8723
+ _tagData.key && _tagData.value ? propagateTagValueValidator(_tagData.value).isValid : false;
8722
8724
  }
8723
8725
  setTagData(index, _tagData);
8724
8726
  };
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-17",
3
+ "version": "0.0.7-beta-19",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -36,6 +36,7 @@
36
36
  "typescript": "^4.9.4",
37
37
  "react-toastify": "^8.2.0",
38
38
  "@tippyjs/react": "^4.2.0",
39
+ "@types/react-select": "^5.0.1",
39
40
  "react-select": "^5.2.2",
40
41
  "@sentry/browser": "^7.31.1"
41
42
  },
@@ -25,10 +25,12 @@ export const TagDetails = ({
25
25
  const propagateTagToResource = (): void => {
26
26
  const _tagData = { ...tagData }
27
27
  _tagData.propagate = !_tagData.propagate
28
+ console.log(_tagData.propagate, _tagData.value)
28
29
  if (_tagData.propagate) {
29
- _tagData.isInvalidValue = !_tagData.value || _tagData.isInvalidValue
30
+ _tagData.isInvalidValue = _tagData.key && (!_tagData.value || _tagData.isInvalidValue)
30
31
  } else {
31
- _tagData.isInvalidValue = _tagData.value ? propagateTagValueValidator(_tagData.value).isValid : false
32
+ _tagData.isInvalidValue =
33
+ _tagData.key && _tagData.value ? propagateTagValueValidator(_tagData.value).isValid : false
32
34
  }
33
35
  setTagData(index, _tagData)
34
36
  }