@apexcura/ui-components 0.0.14-Beta173 → 0.0.14-Beta175

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
@@ -824,7 +824,6 @@ var TableElement = (props) => {
824
824
  );
825
825
  }
826
826
  };
827
- const count = dataSource ? dataSource.length : 0;
828
827
  const onChangePage = (page, pageSize) => {
829
828
  if (props.onChange) {
830
829
  props.onChange({ name: "pagination", page, pageSize });
@@ -846,11 +845,13 @@ var TableElement = (props) => {
846
845
  import_antd14.Table,
847
846
  {
848
847
  className: props.className,
849
- pagination: props.pagination && {
850
- showTotal: (total) => `Total: ${total} items`,
851
- total: count,
852
- showSizeChanger: count > 10,
853
- onChange: onChangePage
848
+ ...props.pagination && {
849
+ pagination: {
850
+ showTotal: (total) => `Total: ${total} items`,
851
+ total: props.count,
852
+ showSizeChanger: props.count ? props.count > 10 : false,
853
+ onChange: onChangePage
854
+ }
854
855
  },
855
856
  onRow: (record) => {
856
857
  return {
package/dist/index.mjs CHANGED
@@ -758,7 +758,6 @@ var TableElement = (props) => {
758
758
  );
759
759
  }
760
760
  };
761
- const count = dataSource ? dataSource.length : 0;
762
761
  const onChangePage = (page, pageSize) => {
763
762
  if (props.onChange) {
764
763
  props.onChange({ name: "pagination", page, pageSize });
@@ -780,11 +779,13 @@ var TableElement = (props) => {
780
779
  Table2,
781
780
  {
782
781
  className: props.className,
783
- pagination: props.pagination && {
784
- showTotal: (total) => `Total: ${total} items`,
785
- total: count,
786
- showSizeChanger: count > 10,
787
- onChange: onChangePage
782
+ ...props.pagination && {
783
+ pagination: {
784
+ showTotal: (total) => `Total: ${total} items`,
785
+ total: props.count,
786
+ showSizeChanger: props.count ? props.count > 10 : false,
787
+ onChange: onChangePage
788
+ }
788
789
  },
789
790
  onRow: (record) => {
790
791
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apexcura/ui-components",
3
- "version": "0.0.14-Beta173",
3
+ "version": "0.0.14-Beta175",
4
4
  "description": "Apex cura React components library",
5
5
  "keywords": [
6
6
  "apex cura",