updated scaffold apis to use random id during the collections initialization and made index columns check on the UI case insensitive

This commit is contained in:
Gani Georgiev
2025-08-26 22:02:00 +03:00
parent 5e67ec1c1c
commit cc902f2df8
32 changed files with 50 additions and 46 deletions
@@ -21,7 +21,7 @@
$: indexParts = CommonHelper.parseIndex(index);
$: indexColumns = indexParts.columns?.map((c) => c.name) || [];
$: indexColumns = indexParts.columns?.map((c) => c.name.toLowerCase()) || [];
export function show(showIndex, showKey) {
key = !CommonHelper.isEmpty(showKey) ? showKey : "";
@@ -63,10 +63,11 @@
function toggleColumn(column) {
const clone = CommonHelper.clone(indexParts);
const normalizedColumn = column.toLowerCase();
const col = clone.columns.find((c) => c.name == column);
if (col) {
CommonHelper.removeByValue(clone.columns, col);
const i = clone.columns.findIndex((c) => c.name.toLowerCase() == normalizedColumn);
if (i >= 0) {
clone.columns.splice(i, 1);
} else {
CommonHelper.pushUnique(clone.columns, { name: column });
}