diff --git a/.changeset/proud-socks-yawn.md b/.changeset/proud-socks-yawn.md new file mode 100644 index 0000000000000..3981ce8f3607e --- /dev/null +++ b/.changeset/proud-socks-yawn.md @@ -0,0 +1,7 @@ +--- +"@refinedev/chakra-ui": minor +--- + +- Ensure `meta` prop is passed to the `ShowButton` component of Charka-UI + +[Resolves #6707](https://github.com/refinedev/refine/issues/6707) diff --git a/examples/inferencer-antd/src/App.tsx b/examples/inferencer-antd/src/App.tsx index 74471d84483e3..0b48f13153a39 100644 --- a/examples/inferencer-antd/src/App.tsx +++ b/examples/inferencer-antd/src/App.tsx @@ -37,6 +37,8 @@ import { ForgotPassword } from "./pages/forgotPassword"; import { Login } from "./pages/login"; import { Register } from "./pages/register"; +import "./lib/init-dayjs"; + function App() { const { t, i18n } = useTranslation(); diff --git a/examples/inferencer-antd/src/lib/init-dayjs.ts b/examples/inferencer-antd/src/lib/init-dayjs.ts new file mode 100644 index 0000000000000..c74139afdf2b9 --- /dev/null +++ b/examples/inferencer-antd/src/lib/init-dayjs.ts @@ -0,0 +1,14 @@ +import dayjs from "dayjs"; +import advancedFormat from "dayjs/plugin/advancedFormat"; +import customParseFormat from "dayjs/plugin/customParseFormat"; +import localeData from "dayjs/plugin/localeData"; +import weekday from "dayjs/plugin/weekday"; +import weekOfYear from "dayjs/plugin/weekOfYear"; +import weekYear from "dayjs/plugin/weekYear"; + +dayjs.extend(customParseFormat); +dayjs.extend(advancedFormat); +dayjs.extend(weekday); +dayjs.extend(localeData); +dayjs.extend(weekOfYear); +dayjs.extend(weekYear); diff --git a/packages/chakra-ui/src/components/buttons/show/index.tsx b/packages/chakra-ui/src/components/buttons/show/index.tsx index a0e461e96fdbe..36461a954ab44 100644 --- a/packages/chakra-ui/src/components/buttons/show/index.tsx +++ b/packages/chakra-ui/src/components/buttons/show/index.tsx @@ -32,6 +32,7 @@ export const ShowButton: React.FC = ({ resource: resourceNameFromProps ?? resourceNameOrRouteName, id: recordItemId, accessControl, + meta, }); const isDisabled = disabled || rest.disabled;