@apexcura/ui-components 0.0.14-Beta172 → 0.0.14-Beta174
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 +12 -7
- package/dist/index.mjs +12 -7
- package/package.json +1 -1
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 });
|
|
@@ -832,7 +831,11 @@ var TableElement = (props) => {
|
|
|
832
831
|
};
|
|
833
832
|
const rowSelectionConfig = props.rowSelection ? {
|
|
834
833
|
onChange: (selectedRowKeys, selectedRows) => {
|
|
835
|
-
console.log(
|
|
834
|
+
console.log(
|
|
835
|
+
`selectedRowKeys: ${selectedRowKeys}`,
|
|
836
|
+
"selectedRows: ",
|
|
837
|
+
selectedRows
|
|
838
|
+
);
|
|
836
839
|
if (props.onChange) {
|
|
837
840
|
props.onChange(selectedRows);
|
|
838
841
|
}
|
|
@@ -844,16 +847,18 @@ var TableElement = (props) => {
|
|
|
844
847
|
className: props.className,
|
|
845
848
|
pagination: props.pagination && {
|
|
846
849
|
showTotal: (total) => `Total: ${total} items`,
|
|
847
|
-
total: count,
|
|
848
|
-
showSizeChanger: count > 10,
|
|
850
|
+
total: props.count,
|
|
851
|
+
showSizeChanger: props.count ? props.count > 10 : 0 > 10,
|
|
849
852
|
onChange: onChangePage
|
|
850
853
|
},
|
|
851
854
|
onRow: (record) => {
|
|
852
855
|
return {
|
|
853
856
|
onClick: () => {
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
+
if (props.view) {
|
|
858
|
+
setSelectedRecord(record);
|
|
859
|
+
handleChange(record);
|
|
860
|
+
setModel(true);
|
|
861
|
+
}
|
|
857
862
|
},
|
|
858
863
|
style: { cursor: "pointer" }
|
|
859
864
|
};
|
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 });
|
|
@@ -766,7 +765,11 @@ var TableElement = (props) => {
|
|
|
766
765
|
};
|
|
767
766
|
const rowSelectionConfig = props.rowSelection ? {
|
|
768
767
|
onChange: (selectedRowKeys, selectedRows) => {
|
|
769
|
-
console.log(
|
|
768
|
+
console.log(
|
|
769
|
+
`selectedRowKeys: ${selectedRowKeys}`,
|
|
770
|
+
"selectedRows: ",
|
|
771
|
+
selectedRows
|
|
772
|
+
);
|
|
770
773
|
if (props.onChange) {
|
|
771
774
|
props.onChange(selectedRows);
|
|
772
775
|
}
|
|
@@ -778,16 +781,18 @@ var TableElement = (props) => {
|
|
|
778
781
|
className: props.className,
|
|
779
782
|
pagination: props.pagination && {
|
|
780
783
|
showTotal: (total) => `Total: ${total} items`,
|
|
781
|
-
total: count,
|
|
782
|
-
showSizeChanger: count > 10,
|
|
784
|
+
total: props.count,
|
|
785
|
+
showSizeChanger: props.count ? props.count > 10 : 0 > 10,
|
|
783
786
|
onChange: onChangePage
|
|
784
787
|
},
|
|
785
788
|
onRow: (record) => {
|
|
786
789
|
return {
|
|
787
790
|
onClick: () => {
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
+
if (props.view) {
|
|
792
|
+
setSelectedRecord(record);
|
|
793
|
+
handleChange(record);
|
|
794
|
+
setModel(true);
|
|
795
|
+
}
|
|
791
796
|
},
|
|
792
797
|
style: { cursor: "pointer" }
|
|
793
798
|
};
|