A React Framework for building internal tools, admin panels, dashboards & B2B apps with unmatched flexibility.
MIT License
Bot releases are visible (Hide)
Published by refine-bot over 1 year ago
cd5a8bfa27b
Thanks @aliemir! - Ability to disable telemetry through --disable-telemetry
flagPublished by refine-bot over 1 year ago
c29a3618cf6
Thanks @aliemir! - Updated the TSDoc comments to fix the broken links in the documentation.Published by refine-bot over 1 year ago
c29a3618cf6
Thanks @aliemir! - Updated the TSDoc comments to fix the broken links in the documentation.Published by refine-bot over 1 year ago
b4298166b6f
Thanks @alicanerdurmaz! - fixed: Inferencer assumes id
is number in custom pages.id
is typeof string
, and inferencer
will infer it as string
.cf07d59587f
, c29a3618cf6
, 0602f4cdf1c
, cf07d59587f
]:
Published by refine-bot over 1 year ago
#4430 cf07d59587f
Thanks @aliemir! - Added queryMeta
and mutationMeta
properties to the useForm
hook. These properties are used to pass specific meta values to the query or mutation. This is useful when you have overlapping values in your data provider's getOne
and update
methods. For example, you may want to change the method
of the mutation to PATCH
but if you pass it in the meta
property, you'll end up changing the method of the getOne
request as well.
queryMeta
and mutationMeta
has precedence over meta
. This means that if you have the same property in queryMeta
and meta
, the value in queryMeta
will be used.
Usage
import { useForm } from "@refinedev/core";
export const MyEditPage = () => {
const form = useForm({
// this is passed both to the mutation and the query requests
meta: {
myValue: "myValue",
},
// this is only passed to the query request
queryMeta: {
propertyOnlyWorksForQuery: "propertyOnlyWorksForQuery",
},
// this is only passed to the mutation request
mutationMeta: {
propertyOnlyWorksForMutation: "propertyOnlyWorksForMutation",
},
});
};
#4430 cf07d59587f
Thanks @aliemir! - Fix missing meta
values in useForm
redirects after submission.
#4431 c29a3618cf6
Thanks @aliemir! - Updated the TSDoc comments to fix the broken links in the documentation.
#4426 0602f4cdf1c
Thanks @yildirayunlu! - fix: resource
parameter in the legacyResourceTransform
helper is not optional but used as optional
Published by refine-bot over 1 year ago
c29a3618cf6
Thanks @aliemir! - Updated the TSDoc comments to fix the broken links in the documentation.Published by refine-bot over 1 year ago
#4430 cf07d59587f
Thanks @aliemir! - Updated the useForm
, useModalForm
, useDrawerForm
and useStepsForm
to accept queryMeta
and mutationMeta
properties of the useForm
hook of @refinedev/core
. These properties are used to pass specific meta values to the query or mutation. This is useful when you have overlapping values in your data provider's getOne
and update
methods. For example, you may want to change the method
of the mutation to PATCH
but if you pass it in the meta
property, you'll end up changing the method of the getOne
request as well.
queryMeta
and mutationMeta
has precedence over meta
. This means that if you have the same property in queryMeta
and meta
, the value in queryMeta
will be used.
Usage
import { useForm } from "@refinedev/core";
export const MyEditPage = () => {
const form = useForm({
// this is passed both to the mutation and the query requests
meta: {
myValue: "myValue",
},
// this is only passed to the query request
queryMeta: {
propertyOnlyWorksForQuery: "propertyOnlyWorksForQuery",
},
// this is only passed to the mutation request
mutationMeta: {
propertyOnlyWorksForMutation: "propertyOnlyWorksForMutation",
},
});
};
#4429 63daabcb703
Thanks @aliemir! - Fixed the issue of formLoading
property in return values of useStepsForm
hook which was not being toggled correctly when the form was submitted or the form data was being fetched.
#4431 c29a3618cf6
Thanks @aliemir! - Updated the TSDoc comments to fix the broken links in the documentation.
Published by refine-bot over 1 year ago
c3b00b20e84
Thanks @BatuhanW! - fix: babel transformation errorPublished by refine-bot over 1 year ago
#4404 f67967e8c87
Thanks @salihozdemir! - refactor: fix name and state inconsistency in <ThemedLayoutV2>
useSiderVisible
is deprecated, instead we created a new hook useThemedLayoutContext
for it. useThemedLayoutContext
similar to useSiderVisible
but it returns more meaningful state names. However, useSiderVisible
is still available for backward compatibility.
Updated Sider
and HamburgerMenu
components using useThemedLayoutContext
.
import { useThemedLayoutContext } from "@refinedev/mantine";
const {
siderCollapsed,
setSiderCollapsed,
mobileSiderOpen,
setMobileSiderOpen,
} = useThemedLayoutContext();
Published by refine-bot over 1 year ago
#4404 f67967e8c87
Thanks @salihozdemir! - refactor: fix name and state inconsistency in <ThemedLayoutV2>
useSiderVisible
is deprecated, instead we created a new hook useThemedLayoutContext
for it. useThemedLayoutContext
similar to useSiderVisible
but it returns more meaningful state names. However, useSiderVisible
is still available for backward compatibility.
Updated Sider
and HamburgerMenu
components using useThemedLayoutContext
.
import { useThemedLayoutContext } from "@refinedev/mui";
const {
siderCollapsed,
setSiderCollapsed,
mobileSiderOpen,
setMobileSiderOpen,
} = useThemedLayoutContext();
Published by refine-bot over 1 year ago
54837825fcc
Thanks @alicanerdurmaz! - fixed: queryOptions
not working as expected in useSelect
hook.Published by refine-bot over 1 year ago
#4404 f67967e8c87
Thanks @salihozdemir! - refactor: fix name and state inconsistency in <ThemedLayoutV2>
useSiderVisible
is deprecated, instead we created a new hook useThemedLayoutContext
for it. useThemedLayoutContext
similar to useSiderVisible
but it returns more meaningful state names. However, useSiderVisible
is still available for backward compatibility.
Updated Sider
and HamburgerMenu
components using useThemedLayoutContext
.
import { useThemedLayoutContext } from "@refinedev/chakra-ui";
const {
siderCollapsed,
setSiderCollapsed,
mobileSiderOpen,
setMobileSiderOpen,
} = useThemedLayoutContext();
Published by refine-bot over 1 year ago
#4404 f67967e8c87
Thanks @salihozdemir! - refactor: fix name and state inconsistency in <ThemedLayoutV2>
useSiderVisible
is deprecated, instead we created a new hook useThemedLayoutContext
for it. useThemedLayoutContext
similar to useSiderVisible
but it returns more meaningful state names. However, useSiderVisible
is still available for backward compatibility.
Updated Sider
and HamburgerMenu
components using useThemedLayoutContext
.
import { useThemedLayoutContext } from "@refinedev/antd";
const {
siderCollapsed,
setSiderCollapsed,
mobileSiderOpen,
setMobileSiderOpen,
} = useThemedLayoutContext();
Published by refine-bot over 1 year ago
ad1856f741f
Thanks @aliemir! - Fix the issue of matchPath
when the resource action is defined as a function or an object. Switched to using matched route string instead of using the route value from the resource
definition.Published by refine-bot over 1 year ago
#4402 4c41be2a2ae
Thanks @aliemir! - Added missing translate
function dependency to the table hooks if i18n
is enabled.
Updated dependencies [473bbe5b31d
, 473bbe5b31d
]:
Published by refine-bot over 1 year ago
#4407 473bbe5b31d
Thanks @aliemir! - Added missing clone
action for document title generation. This fixes the issue of the document title not being generated when the clone
action is used.
This change introduces the documentTitle.{resourceName}.clone
key to the list of i18n
keys that are used to generate the document title.
Default title for the clone
action is "#{{id}} Clone {{resourceName}} | refine"
.
#4407 473bbe5b31d
Thanks @aliemir! - Fixed the issue of label
not taken into account with auto generated document titles. label
will be prioritized over the resource name when generating the document title and the label
will not be capitalized.
Published by refine-bot over 1 year ago
8a424c227a8
Thanks @aliemir! - Updated the type imports in the files to get the tsc
working for the type definitions in the dist
folder. This will fix the issue with the components not being properly typed in user projects.Published by refine-bot over 1 year ago
#4313 28fe67047a0
Thanks @abdellah711! - feat: dynamic window title
This feature enables users to generate document titles for each page. To activate it, users need to include the DocumentTitleHandler
component within the <Refine>
component. By default, the DocumentTitleHandler
will generate titles using the generateDefaultDocumentTitle
exported from @refinedev/core
.
The DocumentTitleHandler
component accepts an optional prop called handler
, which is a callback function. This function is triggered whenever the pathname
changes and receives an object with the following parameters:
{
resource, // 'posts'
action, // 'create'
params, // {id: 1}
pathname, // '/posts/create'
autoGeneratedTitle; // 'Create new Post | refine'
}
The handler
callback should return the new title based on the provided parameters.
To update the title in a child component, the user can use the useDocumentTitle
hook. It accepts either a string representing the new title or an object with the property i18nKey
if the app supports multiple languages.
useDocumentTitle({ i18nKey: "documentTitle.default" });
Published by refine-bot over 1 year ago
#4313 28fe67047a0
Thanks @abdellah711! - feat: dynamic window title for NextJS pages
directory
This feature enables users to generate document titles for each page in NextJS pages
directory. To activate it, users need to include the DocumentTitleHandler
component within the <Refine>
component. By default, the DocumentTitleHandler
will generate titles using the generateDefaultDocumentTitle
exported from @refinedev/core
.
The DocumentTitleHandler
component accepts an optional prop called handler
, which is a callback function. This function is triggered whenever the pathname
changes and receives an object with the following parameters:
{
resource, // 'posts'
action, // 'create'
params, // {id: 1}
pathname, // '/posts/create'
autoGeneratedTitle; // 'Create new Post | refine'
}
The handler
callback should return the new title based on the provided parameters.
To update the title in a child component, the user can use the useDocumentTitle
hook. It accepts either a string representing the new title or an object with the property i18nKey
if the app supports multiple languages.
useDocumentTitle({ i18nKey: "documentTitle.default" });
Note that this hook doesn't support SSR, and it will generate the titles in the client-side only.
Published by refine-bot over 1 year ago
5fcc36c0272
Thanks @alicanerdurmaz! - added: name attribute to input fields in forgotPassword
, register
and updatePassword
forms