@vuu-ui/vuu-ui-controls 4.0.0-beta.2 → 4.0.0-beta.3

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "4.0.0-beta.2",
2
+ "version": "4.0.0-beta.3",
3
3
  "description": "VUU UI Controls",
4
4
  "main": "./src/index.js",
5
5
  "author": "heswell",
@@ -10,17 +10,17 @@
10
10
  "type-defs": "node ../../scripts/build-type-defs.mjs"
11
11
  },
12
12
  "devDependencies": {
13
- "@vuu-ui/vuu-data-types": "4.0.0-beta.2",
14
- "@vuu-ui/vuu-protocol-types": "4.0.0-beta.2",
15
- "@vuu-ui/vuu-table-types": "4.0.0-beta.2"
13
+ "@vuu-ui/vuu-data-types": "4.0.0-beta.3",
14
+ "@vuu-ui/vuu-protocol-types": "4.0.0-beta.3",
15
+ "@vuu-ui/vuu-table-types": "4.0.0-beta.3"
16
16
  },
17
17
  "dependencies": {
18
- "@vuu-ui/vuu-context-menu": "4.0.0-beta.2",
19
- "@vuu-ui/vuu-data-react": "4.0.0-beta.2",
20
- "@vuu-ui/vuu-layout": "4.0.0-beta.2",
21
- "@vuu-ui/vuu-popups": "4.0.0-beta.2",
22
- "@vuu-ui/vuu-table": "4.0.0-beta.2",
23
- "@vuu-ui/vuu-utils": "4.0.0-beta.2",
18
+ "@vuu-ui/vuu-context-menu": "4.0.0-beta.3",
19
+ "@vuu-ui/vuu-data-react": "4.0.0-beta.3",
20
+ "@vuu-ui/vuu-layout": "4.0.0-beta.3",
21
+ "@vuu-ui/vuu-popups": "4.0.0-beta.3",
22
+ "@vuu-ui/vuu-table": "4.0.0-beta.3",
23
+ "@vuu-ui/vuu-utils": "4.0.0-beta.3",
24
24
  "@salt-ds/core": "1.72.0",
25
25
  "@salt-ds/icons": "1.18.3",
26
26
  "@salt-ds/styles": "0.4.1",
@@ -17,7 +17,11 @@ const itemName = (target)=>{
17
17
  if (name) return name;
18
18
  throw Error("[useItemPicker] item name could not be identified, data-name attribute not found");
19
19
  };
20
- const byItemName = ({ name: n1 }, { name: n2 })=>n1 > n2 ? 1 : n2 > n1 ? -1 : 0;
20
+ const byItemName = (item1, item2)=>{
21
+ const n1 = item1.label ? item1.label : item1.name;
22
+ const n2 = item2.label ? item2.label : item2.name;
23
+ return n1 > n2 ? 1 : n2 > n1 ? -1 : 0;
24
+ };
21
25
  const useItemPicker = ({ allItems, selectedItems, maxSelections, onSelectedItemsChange })=>{
22
26
  if (maxSelections && selectedItems.length > maxSelections) throw Error(`[useItemPicker] max selections ${maxSelections} exceeded by selected items (that has count ${selectedItems.length})`);
23
27
  const [searchPattern, setSearchPattern] = useState("");