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

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
@@ -785,6 +785,8 @@ var TableElement = (props) => {
785
785
  dataIndex: "View",
786
786
  key: "View",
787
787
  render: (_, record) => {
788
+ console.log("_", _);
789
+ console.log(record);
788
790
  return /* @__PURE__ */ import_react20.default.createElement(
789
791
  "a",
790
792
  {
@@ -802,14 +804,15 @@ var TableElement = (props) => {
802
804
  });
803
805
  }
804
806
  }
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
- );
807
+ const onChangeTable = (pagination, filters, sorter, extra) => {
808
+ if (extra && extra.currentDataSource) {
809
+ setDataSource(
810
+ extra.currentDataSource.map((row, index) => ({
811
+ ...row,
812
+ index: index + 1
813
+ }))
814
+ );
815
+ }
813
816
  };
814
817
  const count = dataSource ? dataSource.length : 0;
815
818
  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
@@ -719,6 +719,8 @@ var TableElement = (props) => {
719
719
  dataIndex: "View",
720
720
  key: "View",
721
721
  render: (_, record) => {
722
+ console.log("_", _);
723
+ console.log(record);
722
724
  return /* @__PURE__ */ React20.createElement(
723
725
  "a",
724
726
  {
@@ -736,14 +738,15 @@ var TableElement = (props) => {
736
738
  });
737
739
  }
738
740
  }
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
- );
741
+ const onChangeTable = (pagination, filters, sorter, extra) => {
742
+ if (extra && extra.currentDataSource) {
743
+ setDataSource(
744
+ extra.currentDataSource.map((row, index) => ({
745
+ ...row,
746
+ index: index + 1
747
+ }))
748
+ );
749
+ }
747
750
  };
748
751
  const count = dataSource ? dataSource.length : 0;
749
752
  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-Beta159",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",