@cdmx/wappler_ag_grid 1.8.11 → 1.8.13
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/dmx-ag-grid.js +26 -6
- package/package.json +1 -1
package/dmx-ag-grid.js
CHANGED
|
@@ -863,15 +863,29 @@ dmx.Component('ag-grid', {
|
|
|
863
863
|
}
|
|
864
864
|
// comparator for case-insensitive sorting
|
|
865
865
|
const caseInsensitiveComparator = (valueA, valueB) => {
|
|
866
|
-
|
|
867
|
-
|
|
866
|
+
// Check for null, undefined, or empty strings
|
|
867
|
+
if (valueA === null || valueA === undefined || valueA === '') {
|
|
868
|
+
return valueB === null || valueB === undefined || valueB === '' ? 0 : -1;
|
|
868
869
|
}
|
|
869
|
-
|
|
870
|
-
if (valueB === null || valueB === undefined || valueB === ''
|
|
870
|
+
|
|
871
|
+
if (valueB === null || valueB === undefined || valueB === '') {
|
|
871
872
|
return 1;
|
|
872
873
|
}
|
|
873
|
-
|
|
874
|
-
|
|
874
|
+
|
|
875
|
+
// Convert values to numbers if they are numeric
|
|
876
|
+
const numA = Number(valueA);
|
|
877
|
+
const numB = Number(valueB);
|
|
878
|
+
|
|
879
|
+
// If both values are numbers
|
|
880
|
+
if (!isNaN(numA) && !isNaN(numB)) {
|
|
881
|
+
return numA - numB;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
// Convert non-number values to strings for case-insensitive comparison
|
|
885
|
+
const strA = typeof valueA === 'string' ? valueA : String(valueA);
|
|
886
|
+
const strB = typeof valueB === 'string' ? valueB : String(valueB);
|
|
887
|
+
|
|
888
|
+
return strA.toLowerCase().localeCompare(strB.toLowerCase());
|
|
875
889
|
};
|
|
876
890
|
//Custom Row Styles
|
|
877
891
|
function createRowStyleFunction(rstyles) {
|
|
@@ -1910,6 +1924,12 @@ dmx.Component('ag-grid', {
|
|
|
1910
1924
|
position: fixed;
|
|
1911
1925
|
bottom: 0;
|
|
1912
1926
|
}
|
|
1927
|
+
.ag-sticky-bottom {
|
|
1928
|
+
display: none;
|
|
1929
|
+
}
|
|
1930
|
+
.ag-paging-panel {
|
|
1931
|
+
border-top: none;
|
|
1932
|
+
}
|
|
1913
1933
|
`;
|
|
1914
1934
|
if (existingStyle) {
|
|
1915
1935
|
existingStyle.parentNode.replaceChild(styleElement, existingStyle);
|