florixui 1.11.0 → 1.12.0

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/README.md CHANGED
@@ -499,7 +499,7 @@ const navItems = [
499
499
 
500
500
  ### Data Table
501
501
 
502
- A simple, column-driven table with the shadcn data-table look: badge cells, row selection, a row-actions menu, and empty/loading states — no sorting/pagination machinery.
502
+ A simple, column-driven table with the shadcn data-table look: badge cells, row selection (with disableable rows via isRowDisabled), a row-actions menu, and empty/loading states — no sorting/pagination machinery.
503
503
 
504
504
  ```tsx
505
505
  const columns: DataTableColumn<Section>[] = [
@@ -20,6 +20,11 @@ export interface DataTableProps<TRow> {
20
20
  data: TRow[];
21
21
  /** Unique id per row; required for selection. Defaults to the row index. */
22
22
  getRowId?: (row: TRow, index: number) => string;
23
+ /**
24
+ * Mark a row as disabled: it's dimmed, can't be selected (or "select all"-ed),
25
+ * and ignores `onRowClick`. Row actions stay enabled.
26
+ */
27
+ isRowDisabled?: (row: TRow, index: number) => boolean;
23
28
  selectable?: boolean;
24
29
  selectedIds?: string[];
25
30
  onSelectionChange?: (ids: string[]) => void;
@@ -46,4 +51,4 @@ export interface DataTableProps<TRow> {
46
51
  onRowClick?: (row: TRow) => void;
47
52
  className?: string;
48
53
  }
49
- export declare function DataTable<TRow>({ columns, data, getRowId, selectable, selectedIds, onSelectionChange, rowActions, loading, emptyMessage, pagination, pageSize: pageSizeProp, pageSizeOptions, striped, stickyHeader, maxHeight, fillHeight, onRowClick, className, }: DataTableProps<TRow>): import("react/jsx-runtime").JSX.Element;
54
+ export declare function DataTable<TRow>({ columns, data, getRowId, isRowDisabled, selectable, selectedIds, onSelectionChange, rowActions, loading, emptyMessage, pagination, pageSize: pageSizeProp, pageSizeOptions, striped, stickyHeader, maxHeight, fillHeight, onRowClick, className, }: DataTableProps<TRow>): import("react/jsx-runtime").JSX.Element;