@undevy-org/tablewright 0.7.0 → 0.7.2
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.
|
@@ -179,14 +179,14 @@ function Field({ config, value, onChange, fieldId, hiddenSubSet, labels }) {
|
|
|
179
179
|
] });
|
|
180
180
|
}
|
|
181
181
|
if (config.type === "enum") {
|
|
182
|
-
const
|
|
182
|
+
const comboboxValue = Array.isArray(value) && value.length > 0 ? value[0] : null;
|
|
183
183
|
return /* @__PURE__ */ jsxs("label", { className: "flex min-w-0 flex-col gap-1.5", children: [
|
|
184
184
|
/* @__PURE__ */ jsx("span", { className: "text-[11px] font-medium text-[var(--text-secondary)]", children: config.label }),
|
|
185
185
|
/* @__PURE__ */ jsx(
|
|
186
186
|
Combobox,
|
|
187
187
|
{
|
|
188
|
-
value:
|
|
189
|
-
onChange: (v) => onChange(v
|
|
188
|
+
value: comboboxValue,
|
|
189
|
+
onChange: (v) => onChange(v === null ? void 0 : [v]),
|
|
190
190
|
options: config.options ?? [],
|
|
191
191
|
placeholder: labels.anyPlaceholder,
|
|
192
192
|
triggerAriaLabel: config.label,
|
|
@@ -304,12 +304,12 @@ function Field({ config, value, onChange, fieldId, hiddenSubSet, labels }) {
|
|
|
304
304
|
);
|
|
305
305
|
}
|
|
306
306
|
if (sub.type === "enum") {
|
|
307
|
-
const
|
|
307
|
+
const comboboxValue = Array.isArray(subValue) && subValue.length > 0 ? subValue[0] : null;
|
|
308
308
|
return /* @__PURE__ */ jsx(
|
|
309
309
|
Combobox,
|
|
310
310
|
{
|
|
311
|
-
value:
|
|
312
|
-
onChange: (v) => updateSub(sub.key, v
|
|
311
|
+
value: comboboxValue,
|
|
312
|
+
onChange: (v) => updateSub(sub.key, v === null ? void 0 : [v]),
|
|
313
313
|
options: sub.options ?? [],
|
|
314
314
|
placeholder: sub.label,
|
|
315
315
|
triggerAriaLabel: sub.label,
|
package/dist/tablewright.cjs
CHANGED
|
@@ -4189,14 +4189,14 @@ function Field({ config, value, onChange, fieldId, hiddenSubSet, labels }) {
|
|
|
4189
4189
|
] });
|
|
4190
4190
|
}
|
|
4191
4191
|
if (config.type === "enum") {
|
|
4192
|
-
const
|
|
4192
|
+
const comboboxValue = Array.isArray(value) && value.length > 0 ? value[0] : null;
|
|
4193
4193
|
return /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex min-w-0 flex-col gap-1.5", children: [
|
|
4194
4194
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[11px] font-medium text-[var(--text-secondary)]", children: config.label }),
|
|
4195
4195
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4196
4196
|
Combobox,
|
|
4197
4197
|
{
|
|
4198
|
-
value:
|
|
4199
|
-
onChange: (v) => onChange(v
|
|
4198
|
+
value: comboboxValue,
|
|
4199
|
+
onChange: (v) => onChange(v === null ? void 0 : [v]),
|
|
4200
4200
|
options: config.options ?? [],
|
|
4201
4201
|
placeholder: labels.anyPlaceholder,
|
|
4202
4202
|
triggerAriaLabel: config.label,
|
|
@@ -4314,12 +4314,12 @@ function Field({ config, value, onChange, fieldId, hiddenSubSet, labels }) {
|
|
|
4314
4314
|
);
|
|
4315
4315
|
}
|
|
4316
4316
|
if (sub.type === "enum") {
|
|
4317
|
-
const
|
|
4317
|
+
const comboboxValue = Array.isArray(subValue) && subValue.length > 0 ? subValue[0] : null;
|
|
4318
4318
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4319
4319
|
Combobox,
|
|
4320
4320
|
{
|
|
4321
|
-
value:
|
|
4322
|
-
onChange: (v) => updateSub(sub.key, v
|
|
4321
|
+
value: comboboxValue,
|
|
4322
|
+
onChange: (v) => updateSub(sub.key, v === null ? void 0 : [v]),
|
|
4323
4323
|
options: sub.options ?? [],
|
|
4324
4324
|
placeholder: sub.label,
|
|
4325
4325
|
triggerAriaLabel: sub.label,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@undevy-org/tablewright",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.2",
|
|
4
4
|
"description": "React data-table and application-shell components: filters, drawers, row controls, sortable and resizable columns, built on Radix UI and TanStack Table.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|