Skip to content

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

Merged
alicanerdurmaz merged 2 commits into
refinedev:mainfrom
RonakRahane:fix/delete-button-pass-meta-to-can-access
Mar 16, 2026
Merged

fix(core): pass meta params from useDeleteButton to useButtonCanAccess#7289
alicanerdurmaz merged 2 commits into
refinedev:mainfrom
RonakRahane:fix/delete-button-pass-meta-to-can-access

Conversation

@RonakRahane
Copy link
Copy Markdown
Contributor

@RonakRahane RonakRahane commented Feb 19, 2026

PR Checklist

Please check if your PR fulfills the following requirements:

Bugs / Features

What is the current behavior?

useDeleteButton does not pass the meta prop to useButtonCanAccess. This causes custom access control rules that rely on meta params to fail when checking permissions for the delete button.

What is the new behavior?

useDeleteButton now correctly forwards props.meta to useButtonCanAccess, matching the pattern already used in useNavigationButton.

Fixes #7285

One-line fix. useNavigationButton already passes meta correctly, so this change brings useDeleteButton in line with that existing pattern.

@RonakRahane RonakRahane requested a review from a team as a code owner February 19, 2026 15:37
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 19, 2026

🦋 Changeset detected

Latest commit: 438205f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@refinedev/core Patch

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

@raymondoyondi raymondoyondi mentioned this pull request Feb 20, 2026
Copy link
Copy Markdown
Collaborator

@alicanerdurmaz alicanerdurmaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for improving Refine.

Everything looks great except changeset file names should be auto-generated.

@RonakRahane RonakRahane force-pushed the fix/delete-button-pass-meta-to-can-access branch from c684655 to 1a8a596 Compare March 4, 2026 11:03
@RonakRahane
Copy link
Copy Markdown
Contributor Author

Hi @alicanerdurmaz, thanks for the review! I've made the following changes:

Changeset filename is now auto-generated using changeset add
Commits squashed into a single clean commit with proper conventional commit format
Added a test for the meta forwarding fix, following the existing test style in the

delete-button
spec file
I also noticed that #7316 addresses the same issue. I completely respect that PR as well — please feel free to merge whichever one you find best suited. Happy to help improve Refine either way!

@alicanerdurmaz alicanerdurmaz merged commit c040475 into refinedev:main Mar 16, 2026
11 checks passed
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

2 participants