@viliha/vui-ui 1.1.6 → 1.1.7
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 +1 -1
- package/src/record-view.tsx +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viliha/vui-ui",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.7",
|
|
4
4
|
"description": "Vui UI — a clean, token-driven React admin/CRM component library built on Tailwind CSS v4, shadcn-style patterns, and Radix Icons. Ships as TypeScript source (Just-in-Time), compiled by the consuming app.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Suman Bonakurthi",
|
package/src/record-view.tsx
CHANGED
|
@@ -279,6 +279,9 @@ interface RecordViewProps<T extends { id: RowId }> {
|
|
|
279
279
|
/** Persist this view's filter / sort / page under this key (e.g. the route),
|
|
280
280
|
* so the work survives leaving and returning via the open-tabs strip. */
|
|
281
281
|
persistKey?: string;
|
|
282
|
+
/** Allow dragging column edges to resize them. Off by default — columns
|
|
283
|
+
* auto-size, and no resize handle appears on hover. */
|
|
284
|
+
resizableColumns?: boolean;
|
|
282
285
|
}
|
|
283
286
|
|
|
284
287
|
export function RecordView<T extends { id: RowId }>({
|
|
@@ -299,6 +302,7 @@ export function RecordView<T extends { id: RowId }>({
|
|
|
299
302
|
onView,
|
|
300
303
|
onEdit,
|
|
301
304
|
persistKey,
|
|
305
|
+
resizableColumns = false,
|
|
302
306
|
}: RecordViewProps<T>) {
|
|
303
307
|
const { titleLeading } = React.useContext(PageChromeContext);
|
|
304
308
|
// Surface the page title/icon in the app's global top bar.
|
|
@@ -408,7 +412,8 @@ export function RecordView<T extends { id: RowId }>({
|
|
|
408
412
|
0,
|
|
409
413
|
);
|
|
410
414
|
|
|
411
|
-
const resizeHandle = (col: string, label: string) =>
|
|
415
|
+
const resizeHandle = (col: string, label: string) =>
|
|
416
|
+
!resizableColumns ? null : (
|
|
412
417
|
<button
|
|
413
418
|
type="button"
|
|
414
419
|
aria-label={`Resize ${label} column`}
|