Skip to content

Update index.tsx#7293

Closed
raymondoyondi wants to merge 1 commit into
refinedev:mainfrom
raymondoyondi:main
Closed

Update index.tsx#7293
raymondoyondi wants to merge 1 commit into
refinedev:mainfrom
raymondoyondi:main

Conversation

@raymondoyondi
Copy link
Copy Markdown

fix(core): pass meta params to useButtonCanAccess in useDeleteButton (#7289)

This PR addresses the issue where useDeleteButton accepts a meta property but fails to forward it to the useButtonCanAccess hook. This prevents custom Access Control Providers from receiving necessary metadata when determining delete permissions.

Related Issues

Changes

  • Updated packages/core/src/hooks/button/delete-button/index.tsx to include the meta property in the useButtonCanAccess configuration object.

How to test?

  1. Create a custom accessControlProvider that logs the params of the can method.

  2. Use a DeleteButton (or the useDeleteButton hook) and pass a unique meta object: <DeleteButton meta={{ foo: "bar" }} />.

  3. Observe that without this fix, the meta property is undefined in the access control check; with this fix, it correctly contains { foo: "bar" }.

@raymondoyondi raymondoyondi requested a review from a team as a code owner February 20, 2026 14:40
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 20, 2026

⚠️ No Changeset found

Latest commit: 4f9579d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@raymondoyondi raymondoyondi closed this by deleting the head repository Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] useDeleteButton does not pass meta params to useButtonCanAccess in refine/core

1 participant