@bigbinary/neeto-tags-frontend 0.0.40 → 0.0.41

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
@@ -3648,6 +3648,17 @@ var renderColumnData = function renderColumnData(columns, handleEdit, handleDele
3648
3648
  }
3649
3649
  }]);
3650
3650
  };
3651
+ var getCurrentTagType = function getCurrentTagType() {
3652
+ var tagTypes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
3653
+ var searchParams = new URLSearchParams(window.location.search);
3654
+ var tagLabel = searchParams.get("view");
3655
+ var requiredTagType = tagTypes.find(function (tagType) {
3656
+ var _tagType$label;
3657
+
3658
+ return (tagType === null || tagType === void 0 ? void 0 : (_tagType$label = tagType.label) === null || _tagType$label === void 0 ? void 0 : _tagType$label.toLowerCase()) === tagLabel;
3659
+ });
3660
+ return requiredTagType || tagTypes[0];
3661
+ };
3651
3662
 
3652
3663
  function useDebounce(value, delay) {
3653
3664
  var _useState = useState(value),
@@ -7793,7 +7804,7 @@ var Tags = function Tags(_ref) {
7793
7804
  _config$displayMenu = config.displayMenu,
7794
7805
  displayMenu = _config$displayMenu === void 0 ? true : _config$displayMenu;
7795
7806
 
7796
- var _useState = useState(tagTypes[0]),
7807
+ var _useState = useState(getCurrentTagType(tagTypes)),
7797
7808
  _useState2 = _slicedToArray(_useState, 2),
7798
7809
  tagType = _useState2[0],
7799
7810
  setTagType = _useState2[1];