@apexcura/ui-components 0.0.14-Beta157 → 0.0.14-Beta158

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.js CHANGED
@@ -739,7 +739,7 @@ var TableElement = (props) => {
739
739
  (0, import_react20.useEffect)(() => {
740
740
  if (tbody) {
741
741
  setDataSource(
742
- tbody && tbody.map((row, index) => ({
742
+ tbody.map((row, index) => ({
743
743
  ...row,
744
744
  key: index,
745
745
  index: index + 1
@@ -802,14 +802,15 @@ var TableElement = (props) => {
802
802
  });
803
803
  }
804
804
  }
805
- const onChangeTable = (pagination, filters, sorter) => {
806
- const { currentDataSource } = sorter;
807
- setDataSource(
808
- currentDataSource.map((row, index) => ({
809
- ...row,
810
- index: index + 1
811
- }))
812
- );
805
+ const onChangeTable = (pagination, filters, sorter, extra) => {
806
+ if (extra && extra.currentDataSource) {
807
+ setDataSource(
808
+ extra.currentDataSource.map((row, index) => ({
809
+ ...row,
810
+ index: index + 1
811
+ }))
812
+ );
813
+ }
813
814
  };
814
815
  const count = dataSource ? dataSource.length : 0;
815
816
  const onChangePage = (page, pageSize) => {
package/dist/index.mjs CHANGED
@@ -673,7 +673,7 @@ var TableElement = (props) => {
673
673
  useEffect3(() => {
674
674
  if (tbody) {
675
675
  setDataSource(
676
- tbody && tbody.map((row, index) => ({
676
+ tbody.map((row, index) => ({
677
677
  ...row,
678
678
  key: index,
679
679
  index: index + 1
@@ -736,14 +736,15 @@ var TableElement = (props) => {
736
736
  });
737
737
  }
738
738
  }
739
- const onChangeTable = (pagination, filters, sorter) => {
740
- const { currentDataSource } = sorter;
741
- setDataSource(
742
- currentDataSource.map((row, index) => ({
743
- ...row,
744
- index: index + 1
745
- }))
746
- );
739
+ const onChangeTable = (pagination, filters, sorter, extra) => {
740
+ if (extra && extra.currentDataSource) {
741
+ setDataSource(
742
+ extra.currentDataSource.map((row, index) => ({
743
+ ...row,
744
+ index: index + 1
745
+ }))
746
+ );
747
+ }
747
748
  };
748
749
  const count = dataSource ? dataSource.length : 0;
749
750
  const onChangePage = (page, pageSize) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.14-Beta157",
3
+ "version": "0.0.14-Beta158",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",