compote-ui 0.79.0 → 0.79.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.
@@ -30,5 +30,8 @@ export type SelectFilterOption = {
30
30
  * option (labelled `emptyLabel`) last.
31
31
  */
32
32
  export declare function selectFilterOptions(facets: Map<unknown, number>, emptyLabel?: string): SelectFilterOption[];
33
- /** Cell text for a select value: array items joined with `, `; undefined when empty. */
33
+ /**
34
+ * Cell text for a select value: the same distinct items the Funnel lists, joined with `, `;
35
+ * undefined when empty.
36
+ */
34
37
  export declare function formatSelectValue(value: unknown): string | number | boolean | undefined;
@@ -68,11 +68,14 @@ export function selectFilterOptions(facets, emptyLabel = '(empty)') {
68
68
  }
69
69
  return options;
70
70
  }
71
- /** Cell text for a select value: array items joined with `, `; undefined when empty. */
71
+ /**
72
+ * Cell text for a select value: the same distinct items the Funnel lists, joined with `, `;
73
+ * undefined when empty.
74
+ */
72
75
  export function formatSelectValue(value) {
73
76
  if (Array.isArray(value)) {
74
- const items = value.filter((item) => !isEmpty(item));
75
- return items.length ? items.join(', ') : undefined;
77
+ const items = selectCellValues(value);
78
+ return items[0] === EMPTY_SELECT_VALUE ? undefined : items.join(', ');
76
79
  }
77
80
  return isEmpty(value) ? undefined : value;
78
81
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "compote-ui",
3
- "version": "0.79.0",
3
+ "version": "0.79.1",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",