adminforth 2.17.0-next.4 → 2.17.0-next.6

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.
@@ -448,9 +448,10 @@ export function createSearchInputHandlers(
448
448
 
449
449
  export function checkShowIf(c: AdminForthResourceColumnInputCommon, record: Record<string, any>, allColumns: AdminForthResourceColumnInputCommon[]) {
450
450
  if (!c.showIf) return true;
451
+ const recordCopy = { ...record };
451
452
  for (const col of allColumns) {
452
- if (!record[col.name]) {
453
- record[col.name] = null;
453
+ if (!recordCopy[col.name]) {
454
+ recordCopy[col.name] = null;
454
455
  }
455
456
  }
456
457
  const evaluatePredicate = (predicate: Predicate): boolean => {
@@ -467,7 +468,7 @@ export function checkShowIf(c: AdminForthResourceColumnInputCommon, record: Reco
467
468
  const fieldEntries = Object.entries(predicate).filter(([key]) => !key.startsWith('$'));
468
469
  if (fieldEntries.length > 0) {
469
470
  const fieldResult = fieldEntries.every(([field, condition]) => {
470
- const recordValue = record[field];
471
+ const recordValue = recordCopy[field];
471
472
 
472
473
  if (condition === undefined) {
473
474
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.17.0-next.4",
3
+ "version": "2.17.0-next.6",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",