Skip to content

Commit f0c87e4

Browse files
committed
fix: deprecate bulkActions in ResourceOptionsInput and add warning for migration to actions
1 parent f19375c commit f0c87e4

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

adminforth/modules/configValidator.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,6 +880,9 @@ export default class ConfigValidator implements IConfigValidator {
880880
}
881881
}
882882

883+
if (resInput?.options?.bulkActions?.length) {
884+
warnings.push(`Resource "${res.resourceId}" uses deprecated \`bulkActions\`. Please migrate to \`actions\` instead. \`bulkActions\` will be removed in 3.0.0.`);
885+
}
883886
options.bulkActions = this.validateAndNormalizeBulkActions(resInput, res, errors);
884887
options.actions = this.validateAndNormalizeCustomActions(resInput, res, errors);
885888

adminforth/types/Back.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1850,6 +1850,8 @@ export interface ResourceOptionsInput extends Omit<NonNullable<AdminForthResourc
18501850
/**
18511851
* Custom bulk actions list. Bulk actions available in list view when user selects multiple records by
18521852
* using checkboxes.
1853+
* @deprecated Since 2.26.5. Will be removed in 3.0.0. Use `actions` instead.
1854+
18531855
*/
18541856
bulkActions?: Array<AdminForthBulkAction>,
18551857

0 commit comments

Comments
 (0)