@teselagen/ui 0.5.23-beta.10 → 0.5.23-beta.12

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/index.cjs.js CHANGED
@@ -47942,7 +47942,10 @@ const RenderColumns = /* @__PURE__ */ __name(({
47942
47942
  setNewParams
47943
47943
  });
47944
47944
  } else if (cellRenderer && cellRenderer[column.path]) {
47945
- text2 = cellRenderer[column.path](row.value, row.original, row);
47945
+ text2 = cellRenderer[column.path](row.value, row.original, row, {
47946
+ currentParams,
47947
+ setNewParams
47948
+ });
47946
47949
  } else if (text2) {
47947
47950
  text2 = React$1.isValidElement(text2) ? text2 : String(text2);
47948
47951
  }
@@ -48160,7 +48163,10 @@ const RenderColumns = /* @__PURE__ */ __name(({
48160
48163
  }
48161
48164
  if (cellRenderer && cellRenderer[column.path]) {
48162
48165
  tableColumn.Cell = (row) => {
48163
- const val = cellRenderer[column.path](row.value, row.original, row);
48166
+ const val = cellRenderer[column.path](row.value, row.original, row, {
48167
+ currentParams,
48168
+ setNewParams
48169
+ });
48164
48170
  return val;
48165
48171
  };
48166
48172
  } else if (column.render) {
@@ -48470,6 +48476,9 @@ const DataTable = /* @__PURE__ */ __name((_G) => {
48470
48476
  }
48471
48477
  return {};
48472
48478
  }, [
48479
+ props.entities,
48480
+ props.noOrderError,
48481
+ props.isCodeModel,
48473
48482
  convertedSchema,
48474
48483
  currentParams,
48475
48484
  doNotCoercePageSize,
@@ -48504,7 +48513,7 @@ const DataTable = /* @__PURE__ */ __name((_G) => {
48504
48513
  doNotShowEmptyRows,
48505
48514
  doNotValidateUntouchedRows,
48506
48515
  editingCellSelectAll,
48507
- entities: __origEntities = [],
48516
+ entities: _origEntities = [],
48508
48517
  entitiesAcrossPages: _entitiesAcrossPages,
48509
48518
  entityCount,
48510
48519
  errorParsingUrlString,
@@ -48585,10 +48594,11 @@ const DataTable = /* @__PURE__ */ __name((_G) => {
48585
48594
  withSort,
48586
48595
  withTitle = !isSimple
48587
48596
  } = props;
48588
- const _origEntities = useDeepEqualMemo(__origEntities);
48589
- const entities = useDeepEqualMemo(
48590
- ((reduxFormEntities == null ? void 0 : reduxFormEntities.length) ? reduxFormEntities : _origEntities) || []
48597
+ const _entities = React$1.useMemo(
48598
+ () => ((reduxFormEntities == null ? void 0 : reduxFormEntities.length) ? reduxFormEntities : _origEntities) || [],
48599
+ [_origEntities, reduxFormEntities]
48591
48600
  );
48601
+ const entities = useDeepEqualMemo(_entities);
48592
48602
  const entitiesAcrossPages = useDeepEqualMemo(_entitiesAcrossPages);
48593
48603
  React$1.useEffect(() => {
48594
48604
  if (change) {
package/index.es.js CHANGED
@@ -47924,7 +47924,10 @@ const RenderColumns = /* @__PURE__ */ __name(({
47924
47924
  setNewParams
47925
47925
  });
47926
47926
  } else if (cellRenderer && cellRenderer[column.path]) {
47927
- text2 = cellRenderer[column.path](row.value, row.original, row);
47927
+ text2 = cellRenderer[column.path](row.value, row.original, row, {
47928
+ currentParams,
47929
+ setNewParams
47930
+ });
47928
47931
  } else if (text2) {
47929
47932
  text2 = isValidElement(text2) ? text2 : String(text2);
47930
47933
  }
@@ -48142,7 +48145,10 @@ const RenderColumns = /* @__PURE__ */ __name(({
48142
48145
  }
48143
48146
  if (cellRenderer && cellRenderer[column.path]) {
48144
48147
  tableColumn.Cell = (row) => {
48145
- const val = cellRenderer[column.path](row.value, row.original, row);
48148
+ const val = cellRenderer[column.path](row.value, row.original, row, {
48149
+ currentParams,
48150
+ setNewParams
48151
+ });
48146
48152
  return val;
48147
48153
  };
48148
48154
  } else if (column.render) {
@@ -48452,6 +48458,9 @@ const DataTable = /* @__PURE__ */ __name((_G) => {
48452
48458
  }
48453
48459
  return {};
48454
48460
  }, [
48461
+ props.entities,
48462
+ props.noOrderError,
48463
+ props.isCodeModel,
48455
48464
  convertedSchema,
48456
48465
  currentParams,
48457
48466
  doNotCoercePageSize,
@@ -48486,7 +48495,7 @@ const DataTable = /* @__PURE__ */ __name((_G) => {
48486
48495
  doNotShowEmptyRows,
48487
48496
  doNotValidateUntouchedRows,
48488
48497
  editingCellSelectAll,
48489
- entities: __origEntities = [],
48498
+ entities: _origEntities = [],
48490
48499
  entitiesAcrossPages: _entitiesAcrossPages,
48491
48500
  entityCount,
48492
48501
  errorParsingUrlString,
@@ -48567,10 +48576,11 @@ const DataTable = /* @__PURE__ */ __name((_G) => {
48567
48576
  withSort,
48568
48577
  withTitle = !isSimple
48569
48578
  } = props;
48570
- const _origEntities = useDeepEqualMemo(__origEntities);
48571
- const entities = useDeepEqualMemo(
48572
- ((reduxFormEntities == null ? void 0 : reduxFormEntities.length) ? reduxFormEntities : _origEntities) || []
48579
+ const _entities = useMemo(
48580
+ () => ((reduxFormEntities == null ? void 0 : reduxFormEntities.length) ? reduxFormEntities : _origEntities) || [],
48581
+ [_origEntities, reduxFormEntities]
48573
48582
  );
48583
+ const entities = useDeepEqualMemo(_entities);
48574
48584
  const entitiesAcrossPages = useDeepEqualMemo(_entitiesAcrossPages);
48575
48585
  useEffect(() => {
48576
48586
  if (change2) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ui",
3
- "version": "0.5.23-beta.10",
3
+ "version": "0.5.23-beta.12",
4
4
  "main": "./src/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -752,7 +752,10 @@ export const RenderColumns = ({
752
752
  setNewParams
753
753
  });
754
754
  } else if (cellRenderer && cellRenderer[column.path]) {
755
- text = cellRenderer[column.path](row.value, row.original, row);
755
+ text = cellRenderer[column.path](row.value, row.original, row, {
756
+ currentParams,
757
+ setNewParams
758
+ });
756
759
  } else if (text) {
757
760
  text = isValidElement(text) ? text : String(text);
758
761
  }
@@ -983,7 +986,10 @@ export const RenderColumns = ({
983
986
  }
984
987
  if (cellRenderer && cellRenderer[column.path]) {
985
988
  tableColumn.Cell = row => {
986
- const val = cellRenderer[column.path](row.value, row.original, row);
989
+ const val = cellRenderer[column.path](row.value, row.original, row, {
990
+ currentParams,
991
+ setNewParams
992
+ });
987
993
  return val;
988
994
  };
989
995
  } else if (column.render) {
@@ -364,6 +364,9 @@ const DataTable = ({
364
364
  return {};
365
365
  // eslint-disable-next-line react-hooks/exhaustive-deps
366
366
  }, [
367
+ props.entities,
368
+ props.noOrderError,
369
+ props.isCodeModel,
367
370
  convertedSchema,
368
371
  currentParams,
369
372
  doNotCoercePageSize,
@@ -403,7 +406,7 @@ const DataTable = ({
403
406
  doNotShowEmptyRows,
404
407
  doNotValidateUntouchedRows,
405
408
  editingCellSelectAll,
406
- entities: __origEntities = [],
409
+ entities: _origEntities = [],
407
410
  entitiesAcrossPages: _entitiesAcrossPages,
408
411
  entityCount,
409
412
  errorParsingUrlString,
@@ -485,11 +488,13 @@ const DataTable = ({
485
488
  withTitle = !isSimple
486
489
  } = props;
487
490
 
488
- // We need to memoize the entities so that we don't rerender the table
489
- const _origEntities = useDeepEqualMemo(__origEntities);
490
- const entities = useDeepEqualMemo(
491
- (reduxFormEntities?.length ? reduxFormEntities : _origEntities) || []
491
+ const _entities = useMemo(
492
+ () => (reduxFormEntities?.length ? reduxFormEntities : _origEntities) || [],
493
+ [_origEntities, reduxFormEntities]
492
494
  );
495
+
496
+ const entities = useDeepEqualMemo(_entities);
497
+
493
498
  const entitiesAcrossPages = useDeepEqualMemo(_entitiesAcrossPages);
494
499
 
495
500
  // This is because we need to maintain the reduxFormSelectedEntityIdMap and