muffin-admin 1.45.4 → 1.45.5

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.
package/dist/types.d.ts CHANGED
@@ -19,7 +19,7 @@ export type AdminShowLink = {
19
19
  label: string;
20
20
  title?: string;
21
21
  icon?: string;
22
- fk?: string;
22
+ field?: string;
23
23
  };
24
24
  export type AdminShowProps = {
25
25
  actions: AdminAction[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muffin-admin",
3
- "version": "1.45.4",
3
+ "version": "1.45.5",
4
4
  "description": "NPM package for https://github.com/klen/muffin-admin",
5
5
  "files": [
6
6
  "src",
@@ -4,7 +4,7 @@ import LinkButton from "../buttons/LinkButton"
4
4
  import { AdminShowLink } from "../types"
5
5
  import { AdminPropsContext } from "../utils"
6
6
 
7
- export function LinkAction({ fk, icon, ...props }: AdminShowLink & { resource: string }) {
7
+ export function LinkAction({ field, icon, ...props }: AdminShowLink & { resource: string }) {
8
8
  const adminProps = useContext(AdminPropsContext)
9
9
  const record = useRecordContext()
10
10
  const currentResource = useResourceContext()
@@ -12,5 +12,7 @@ export function LinkAction({ fk, icon, ...props }: AdminShowLink & { resource: s
12
12
 
13
13
  icon = icon || adminProps?.resources[props.resource]?.icon
14
14
 
15
- return <LinkButton {...props} icon={icon} filters={{ [currentResource]: record[fk || "id"] }} />
15
+ return (
16
+ <LinkButton {...props} icon={icon} filters={{ [currentResource]: record[field || "id"] }} />
17
+ )
16
18
  }
package/src/types.ts CHANGED
@@ -17,7 +17,7 @@ export type AdminShowLink = {
17
17
  label: string
18
18
  title?: string
19
19
  icon?: string
20
- fk?: string
20
+ field?: string
21
21
  }
22
22
  export type AdminShowProps = {
23
23
  actions: AdminAction[]