ui-soxo-bootstrap-core 2.4.25-dev.36 → 2.4.25-dev.37
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useState, useEffect, useContext, useRef } from 'react';
|
|
2
2
|
|
|
3
|
-
import { Table, Skeleton, Input, Tag, Modal, message, Pagination } from 'antd';
|
|
3
|
+
import { Table, Skeleton, Input, Tag, Modal, message, Pagination, Tooltip } from 'antd';
|
|
4
4
|
|
|
5
5
|
import { QrcodeOutlined } from '@ant-design/icons';
|
|
6
6
|
|
|
@@ -798,9 +798,19 @@ function GuestList({
|
|
|
798
798
|
}
|
|
799
799
|
},
|
|
800
800
|
field: entry.field,
|
|
801
|
-
title: entry.title,
|
|
801
|
+
// title: entry.title,
|
|
802
|
+
// title: (
|
|
803
|
+
// <Tooltip title={entry.title}>
|
|
804
|
+
// {entry.title}
|
|
805
|
+
// </Tooltip>
|
|
806
|
+
// ),
|
|
807
|
+
title: (
|
|
808
|
+
<Tooltip title={entry.tooltip || entry.title}>
|
|
809
|
+
<span>{entry.title}</span>
|
|
810
|
+
</Tooltip>
|
|
811
|
+
),
|
|
802
812
|
key: entry.field,
|
|
803
|
-
width: entry.width ? parseInt(entry.width) :
|
|
813
|
+
width: entry.width ? parseInt(entry.width) : 160,
|
|
804
814
|
fixed: entry.isFixedColumn ? entry.isFixedColumn : null, // Conditionally setting the 'fixed' key to 'left' if 'isColumnStatic' is true; otherwise, setting it to null.
|
|
805
815
|
// Check if filtering is enabled and patients is an array
|
|
806
816
|
filters:
|
|
@@ -824,7 +834,6 @@ function GuestList({
|
|
|
824
834
|
// Return the value from record.props if it exists
|
|
825
835
|
return description && record[description] ? record[description] : null;
|
|
826
836
|
}
|
|
827
|
-
|
|
828
837
|
return record[entry.field];
|
|
829
838
|
},
|
|
830
839
|
// Add align property based on column type
|
|
@@ -908,13 +917,21 @@ function GuestList({
|
|
|
908
917
|
// setData(data);
|
|
909
918
|
|
|
910
919
|
// Define export data
|
|
911
|
-
|
|
920
|
+
// Sanitize cols for export to ensure titles are strings
|
|
921
|
+
const exportCols = cols.map((col) => {
|
|
922
|
+
if (col.title && typeof col.title === 'object' && col.title.props) {
|
|
923
|
+
return { ...col, title: col.title.props.title };
|
|
924
|
+
}
|
|
925
|
+
return col;
|
|
926
|
+
});
|
|
927
|
+
|
|
928
|
+
let exportDatas = getExportData(patients, exportCols);
|
|
912
929
|
|
|
913
930
|
if (exportDatas.exportDataColumns.length && exportDatas.exportDataHeaders.length) {
|
|
914
931
|
setExportData({ exportDatas });
|
|
915
932
|
}
|
|
916
933
|
}
|
|
917
|
-
}, [patients]);
|
|
934
|
+
}, [patients, columns]);
|
|
918
935
|
|
|
919
936
|
let filtered;
|
|
920
937
|
|