fix(chakra-ui): add meta to ShowButton Props#6740
Conversation
- add changeset
✅ Deploy Preview for refine-doc-live-previews ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
I had attempted to write a test for this, to the Could something be wrong with my implementation? Here is the code: it("should go to show page with id coming from meta", async () => {
const { getByText } = render(
<Routes>
<Route
path="/:resource"
element={
<ShowButton
recordItemId="1"
meta={{
authorId: "10",
}}
/>
}
/>
</Routes>,
{
wrapper: TestWrapper({
resources: [
{
name: "posts",
list: "/posts",
show: "/posts/:authorId/show/:id",
},
],
routerInitialEntries: ["/posts"],
}),
},
);
await act(async () => {
fireEvent.click(getByText("Show"));
});
expect(window.location.pathname).toBe("/posts/10/show/1");
});This test case is important because the |
🦋 Changeset detectedLatest commit: 16f2590 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
PR Checklist
Please check if your PR fulfills the following requirements:
Bugs / Features
What is the current behavior?
meta doesn't impact URL in chakra-ui show button
What is the new behavior?
meta now impacts URL in chakra-ui show button
fixes (issue)
#6707
Notes for reviewers