Skip to content

[BUG] <ShowButton> with meta does not resolve to proper URL #6707

Open
@marqsy

Description

@marqsy

Describe the bug

Given the following resource from app/layout.tsx:
`
import routerProvider from "@refinedev/nextjs-router";
...

{
name: "gatherings",
show: "/gatherings/:gatheringType/show/:id",
},
`

and the following from gatherings/list.tsx

`
import {
ShowButton
} from "@refinedev/chakra-ui";

<ShowButton
resource="gatherings"
recordItemId={info.getValue() as number}
meta={{ "gatheringType": "collaboration" }}
/>
`

shouldn't the list page display a Show button with a link to gatherings/collaboration/2 or whatever the id is?

instead the show button links to gatherings/:gatheringType/2. This is not as intended.

am i missing something or is this a bug?

this is refine v4.57.5

Steps To Reproduce

  1. create a resource as above
  2. create a list page w/ ShowButton as above
  3. view the compiled list page's ShowButton url.

Expected behavior

the URL should be correct

Packages

  • @refinedev/chakra-ui
  • @refinedev/nextjs-router

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions