Skip to content

Conversation

@write-arsalan-nawaz
Copy link

@write-arsalan-nawaz write-arsalan-nawaz commented Apr 21, 2025

This PR adds support for using the meta prop in the <Show> component (both Mantine and MUI) to control the visibility of Edit and Delete buttons.

What's Added

  • meta.canDelete and meta.canEdit support
  • Fallback preserved to canDelete and canEdit props

Closes #7951

@write-arsalan-nawaz write-arsalan-nawaz requested a review from a team as a code owner April 21, 2025 12:29
@changeset-bot
Copy link

changeset-bot bot commented Apr 21, 2025

⚠️ No Changeset found

Latest commit: 19586a6

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

@netlify
Copy link

netlify bot commented Apr 21, 2025

Deploy Preview for refine-doc-live-previews failed.

Built without sensitive environment variables

Name Link
🔨 Latest commit 19586a6
🔍 Latest deploy log https://app.netlify.com/sites/refine-doc-live-previews/deploys/68063a141fcb5400085d9d8c

@alicanerdurmaz
Copy link
Member

Hi @write-arsalan-nawaz,

Thanks for the PR! I have a couple of questions:

  • In antd you mount useShow, but you don’t use its return value. The other UI packages don’t mount it at all. Could you share the reason?
  • You use meta.canDelete, yet we already have the canDelete prop (same for canEdit). Why do we need both?

I’m not sure what problem this PR fixes or which new feature it adds. Could you open an issue to explain the goal? I’ll be happy to review again after that.

For now, I’ll close the PR.

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.

2 participants