Skip to content

Commit cfff14b

Browse files
authored
Merge pull request #596 from devforth/feature/AdminForth/1458/if-showin-in-actions-is-not-se
fix: update validation logic to check for bulkHandler in allowed actions
2 parents 3ede2a1 + 5a54749 commit cfff14b

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

adminforth/modules/configValidator.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,15 +417,18 @@ export default class ConfigValidator implements IConfigValidator {
417417
if (!action.id) {
418418
action.id = md5hash(action.name);
419419
}
420+
421+
const defaultListValue = !!(action.action || action.url);
422+
420423
if (!action.showIn) {
421424
action.showIn = {
422-
list: true,
425+
list: defaultListValue,
423426
listThreeDotsMenu: false,
424427
showButton: false,
425428
showThreeDotsMenu: false,
426429
}
427430
} else {
428-
action.showIn.list = action.showIn.list ?? true;
431+
action.showIn.list = action.showIn.list ?? defaultListValue;
429432
action.showIn.listThreeDotsMenu = action.showIn.listThreeDotsMenu ?? false;
430433
action.showIn.showButton = action.showIn.showButton ?? false;
431434
action.showIn.showThreeDotsMenu = action.showIn.showThreeDotsMenu ?? false;

0 commit comments

Comments
 (0)