Skip to content

Commit dffff97

Browse files
committed
feat: add support of showIf
1 parent da8453e commit dffff97

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ export default class extends AdminForthPlugin {
7575
create: false,
7676
edit: false
7777
},
78-
label: this.options.labelForColumn || this.options.linkedResourceId
78+
label: this.options.labelForColumn || this.options.linkedResourceId,
79+
showIf: this.options.showIf || null,
7980
};
8081
resourceConfig.columns.push(virtualColumn);
8182

types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
import { Predicate } from "adminforth"
12
export interface PluginOptions {
23
linkedResourceId: string
34
dontDeleteJunctionRecords?: boolean
45
labelForColumn?: string
6+
showIf?: Predicate
57
}

0 commit comments

Comments
 (0)