Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added setAction feature #6451 #6487

Closed

Conversation

AYUSHKUMARGUPTA
Copy link

@AYUSHKUMARGUPTA AYUSHKUMARGUPTA commented Nov 13, 2024

PR Checklist

Please check if your PR fulfills the following requirements:

Bugs / Features

What is the current behavior?

What is the new behavior?

fixes (issue)

Notes for reviewers

Added setAction function to get action dynamically

Usage
`const { setAction, show, modalProps } = useModalForm({
action: "create",
});

// Call setAction to change the action type
const handleEdit = () => {
setAction("edit");
show();
};

const handleCreate = () => {
setAction("create");
show();
};`

@AYUSHKUMARGUPTA AYUSHKUMARGUPTA requested a review from a team as a code owner November 13, 2024 07:01
Copy link

changeset-bot bot commented Nov 13, 2024

🦋 Changeset detected

Latest commit: 5748268

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

This PR includes changesets to release 3 packages
Name Type
@refinedev/antd Major
@refinedev/inferencer Major
@refinedev/live-previews 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

Copy link
Member

@BatuhanW BatuhanW left a comment

Choose a reason for hiding this comment

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

Hey @AYUSHKUMARGUPTA thanks for the PR!

Could you add tests to make sure new behaviour works as expected and update documentation so people will be aware of this feature?

@AYUSHKUMARGUPTA
Copy link
Author

@BatuhanW Sure will get this updated

@aress31
Copy link

aress31 commented Nov 16, 2024

It would be better to add a metadata prop to the show method this way any data can be passed down...

@AYUSHKUMARGUPTA
Copy link
Author

Updated the test cases and metadata prop

@AYUSHKUMARGUPTA
Copy link
Author

Updated the code for build failure.

@alicanerdurmaz alicanerdurmaz removed their assignment Nov 20, 2024
@alicanerdurmaz alicanerdurmaz changed the base branch from master to releases/december-2024 November 25, 2024 07:54
@aliemir
Copy link
Member

aliemir commented Nov 25, 2024

Thank you for the PR @AYUSHKUMARGUPTA, I've just left a comment to the issue #6451 (comment) and tried to explain the missing steps in the implementation of this feature. For now, we've decided to keep this feature on hold and include it in our next release roadmap. 🙏

@aliemir aliemir closed this Nov 25, 2024
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.

[FEAT] useModalForm Expose a SetAction for RefineCoreProps
5 participants