@pdg/react-table 1.0.29 → 1.0.30

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.
@@ -16,6 +16,13 @@ export interface TableColumn<T = TableItem> {
16
16
  ellipsis?: boolean;
17
17
  dateFormat?: string;
18
18
  tooltipProps?: Omit<TooltipProps, 'children' | 'title'>;
19
+ display?: {
20
+ xs?: boolean;
21
+ sm?: boolean;
22
+ md?: boolean;
23
+ lg?: boolean;
24
+ xl?: boolean;
25
+ };
19
26
  head?: {
20
27
  className?: CommonSxProps['className'];
21
28
  style?: CommonSxProps['style'];
package/dist/index.esm.js CHANGED
@@ -8420,6 +8420,7 @@ var TableCommonCell = function (_a) {
8420
8420
  var _a, _b, _c, _d, _e, _f;
8421
8421
  var sx;
8422
8422
  var getSx;
8423
+ var displaySx;
8423
8424
  switch (type) {
8424
8425
  case 'head':
8425
8426
  sx = (_a = column.head) === null || _a === void 0 ? void 0 : _a.sx;
@@ -8436,6 +8437,20 @@ var TableCommonCell = function (_a) {
8436
8437
  getSx = ((_e = column.footer) === null || _e === void 0 ? void 0 : _e.onGetSx) ? (_f = column.footer) === null || _f === void 0 ? void 0 : _f.onGetSx() : undefined;
8437
8438
  break;
8438
8439
  }
8440
+ if (column.display) {
8441
+ var display = {};
8442
+ if (column.display.xs !== undefined)
8443
+ display.xs = column.display.xs ? 'table-cell' : 'none';
8444
+ if (column.display.sm !== undefined)
8445
+ display.sm = column.display.sm ? 'table-cell' : 'none';
8446
+ if (column.display.md !== undefined)
8447
+ display.md = column.display.md ? 'table-cell' : 'none';
8448
+ if (column.display.lg !== undefined)
8449
+ display.lg = column.display.lg ? 'table-cell' : 'none';
8450
+ if (column.display.xl !== undefined)
8451
+ display.xl = column.display.xl ? 'table-cell' : 'none';
8452
+ displaySx = { display: display };
8453
+ }
8439
8454
  var sxList = [];
8440
8455
  if (getSx)
8441
8456
  sxList.push(getSx);
@@ -8443,6 +8458,8 @@ var TableCommonCell = function (_a) {
8443
8458
  sxList.push(sx);
8444
8459
  if (initSx)
8445
8460
  sxList.push(initSx);
8461
+ if (displaySx)
8462
+ sxList.push(displaySx);
8446
8463
  if (sxList.length > 0) {
8447
8464
  if (sxList.length === 1) {
8448
8465
  return sxList[0];