@nccirtu/tablefy 0.7.3 → 0.7.5

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.
@@ -46,6 +46,14 @@ class BaseColumn {
46
46
  this.config.hidden = hidden;
47
47
  return this;
48
48
  }
49
+ visibleByDefault(visible = true) {
50
+ this.config.visibleByDefault = visible;
51
+ return this;
52
+ }
53
+ visibilityLabel(label) {
54
+ this.config.visibilityLabel = label;
55
+ return this;
56
+ }
49
57
  alignLeft() {
50
58
  this.config.align = "left";
51
59
  return this;
@@ -1231,9 +1239,13 @@ class TextColumn extends BaseColumn {
1231
1239
  return this;
1232
1240
  }
1233
1241
  build() {
1234
- const { accessor, label, sortable, prefix, suffix, placeholder, formatter, } = this.config;
1242
+ const { accessor, label, sortable, prefix, suffix, placeholder, formatter, visibleByDefault, visibilityLabel, } = this.config;
1235
1243
  return {
1236
1244
  accessorKey: accessor,
1245
+ meta: {
1246
+ visibleByDefault,
1247
+ visibilityLabel: visibilityLabel || label || String(accessor),
1248
+ },
1237
1249
  header: ({ column }) => {
1238
1250
  const displayLabel = label || String(accessor);
1239
1251
  if (!sortable) {