@ctlyst.id/internal-ui 4.1.16 → 4.2.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/dist/index.d.mts CHANGED
@@ -252,6 +252,7 @@ interface DataTableProps<T> {
252
252
  sortDescFirst?: boolean;
253
253
  headerSticky?: boolean;
254
254
  columnPinning?: ColumnPinningState;
255
+ cellLineClamp?: number;
255
256
  onRowClick?: (data: T) => void;
256
257
  isRowDisabled?: (row: T) => boolean;
257
258
  }
package/dist/index.d.ts CHANGED
@@ -252,6 +252,7 @@ interface DataTableProps<T> {
252
252
  sortDescFirst?: boolean;
253
253
  headerSticky?: boolean;
254
254
  columnPinning?: ColumnPinningState;
255
+ cellLineClamp?: number;
255
256
  onRowClick?: (data: T) => void;
256
257
  isRowDisabled?: (row: T) => boolean;
257
258
  }
package/dist/index.js CHANGED
@@ -1432,7 +1432,16 @@ var useDataTable = ({
1432
1432
  };
1433
1433
  var DataTable = React5.forwardRef((props, ref) => {
1434
1434
  var _a, _b, _c, _d, _e, _f, _g;
1435
- const { isLoading, styles, headerSticky, onRowClick, container, columnPinning, isRowDisabled } = props;
1435
+ const {
1436
+ isLoading,
1437
+ styles,
1438
+ headerSticky,
1439
+ onRowClick,
1440
+ container,
1441
+ columnPinning,
1442
+ isRowDisabled,
1443
+ cellLineClamp = 2
1444
+ } = props;
1436
1445
  const { table, toggleAllRowsSelected, generateColumn } = useDataTable(props);
1437
1446
  const refTable = React5.useRef(null);
1438
1447
  React5.useImperativeHandle(ref, () => ({
@@ -1618,10 +1627,12 @@ var DataTable = React5.forwardRef((props, ref) => {
1618
1627
  onClick: (e) => {
1619
1628
  e.stopPropagation();
1620
1629
  },
1621
- noOfLines: 2,
1622
- sx: {
1623
- display: "-webkit-inline-box"
1624
- },
1630
+ ...cellLineClamp > 0 ? {
1631
+ noOfLines: cellLineClamp,
1632
+ sx: {
1633
+ display: "-webkit-inline-box"
1634
+ }
1635
+ } : {},
1625
1636
  children: (0, import_react_table.flexRender)(cell.column.columnDef.cell, cell.getContext())
1626
1637
  }
1627
1638
  )