@synerise/ds-context-selector 0.24.8 → 0.25.1

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/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.25.1](https://github.com/Synerise/synerise-design/compare/@synerise/ds-context-selector@0.25.0...@synerise/ds-context-selector@0.25.1) (2024-09-17)
7
+
8
+ **Note:** Version bump only for package @synerise/ds-context-selector
9
+
10
+
11
+
12
+
13
+
14
+ # [0.25.0](https://github.com/Synerise/synerise-design/compare/@synerise/ds-context-selector@0.24.8...@synerise/ds-context-selector@0.25.0) (2024-09-13)
15
+
16
+
17
+ ### Features
18
+
19
+ * **context-selector:** reset tabs on item select ([34b398a](https://github.com/Synerise/synerise-design/commit/34b398a4e5cdf948031ec1ab311acf712674b2a8))
20
+
21
+
22
+
23
+
24
+
6
25
  ## [0.24.8](https://github.com/Synerise/synerise-design/compare/@synerise/ds-context-selector@0.24.7...@synerise/ds-context-selector@0.24.8) (2024-09-11)
7
26
 
8
27
 
@@ -100,6 +100,11 @@ var ContextSelectorDropdown = function ContextSelectorDropdown(_ref) {
100
100
  var hideDropdown = useCallback(function () {
101
101
  setDropdownVisible(false);
102
102
  }, [setDropdownVisible]);
103
+ var handleSelect = useCallback(function (parameter) {
104
+ setSelected(parameter);
105
+ setActiveGroup(undefined);
106
+ setActiveTab(defaultTab);
107
+ }, [defaultTab, setSelected]);
103
108
  var currentTabItems = useMemo(function () {
104
109
  return groups ? getActiveTabGroup(activeTab, groups) : undefined;
105
110
  }, [groups, activeTab]);
@@ -139,7 +144,7 @@ var ContextSelectorDropdown = function ContextSelectorDropdown(_ref) {
139
144
  searchQuery: searchQuery,
140
145
  clearSearch: clearSearch,
141
146
  hideDropdown: hideDropdown,
142
- select: setSelected,
147
+ select: handleSelect,
143
148
  selected: Boolean(value) && item.id === (value == null ? void 0 : value.id),
144
149
  menuItemHeight: menuItemHeight
145
150
  };
@@ -163,7 +168,7 @@ var ContextSelectorDropdown = function ContextSelectorDropdown(_ref) {
163
168
  }
164
169
  });
165
170
  return resultItems;
166
- }, [activeGroup, classNames, searchQuery, handleOnSetGroup, menuItemHeight, clearSearch, hideDropdown, setSelected, value, texts.showMore, groups]);
171
+ }, [activeGroup, classNames, searchQuery, handleOnSetGroup, menuItemHeight, clearSearch, hideDropdown, handleSelect, value, texts.showMore, groups]);
167
172
 
168
173
  var _useSearchResults = useSearchResults(items, groups, activeTab, groupByGroupName, activeGroup, searchQuery, maxSearchResultsInGroup),
169
174
  searchResults = _useSearchResults.searchResults;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-context-selector",
3
- "version": "0.24.8",
3
+ "version": "0.25.1",
4
4
  "description": "ContextSelector UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -27,25 +27,25 @@
27
27
  "test:watch": "npm run test -- --watchAll",
28
28
  "types": "tsc --noEmit"
29
29
  },
30
- "gitHead": "fcf3fa64e906cf9fefb37a61ee28218c8eed9b73",
30
+ "gitHead": "ae3c38b44ca0f9071cd55f7b82c182a99b5710e8",
31
31
  "sideEffects": [
32
32
  "dist/style/*",
33
33
  "*.less"
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-button": "^0.21.9",
38
- "@synerise/ds-dropdown": "^0.18.13",
39
- "@synerise/ds-factors": "^0.25.1",
40
- "@synerise/ds-icon": "^0.65.4",
41
- "@synerise/ds-information-card": "^0.5.7",
42
- "@synerise/ds-list-item": "^0.4.9",
43
- "@synerise/ds-menu": "^0.19.13",
44
- "@synerise/ds-result": "^0.7.3",
45
- "@synerise/ds-scrollbar": "^0.11.9",
46
- "@synerise/ds-skeleton": "^0.6.7",
47
- "@synerise/ds-tabs": "^0.15.6",
48
- "@synerise/ds-utils": "^0.29.1",
37
+ "@synerise/ds-button": "^0.21.11",
38
+ "@synerise/ds-dropdown": "^0.18.15",
39
+ "@synerise/ds-factors": "^0.25.3",
40
+ "@synerise/ds-icon": "^0.65.6",
41
+ "@synerise/ds-information-card": "^0.5.9",
42
+ "@synerise/ds-list-item": "^0.4.11",
43
+ "@synerise/ds-menu": "^0.19.15",
44
+ "@synerise/ds-result": "^0.7.5",
45
+ "@synerise/ds-scrollbar": "^0.11.11",
46
+ "@synerise/ds-skeleton": "^0.6.9",
47
+ "@synerise/ds-tabs": "^0.16.1",
48
+ "@synerise/ds-utils": "^0.29.3",
49
49
  "react-window": "1.8.5",
50
50
  "uuid": "^8.3.2"
51
51
  },