Open AYUSHKUMARGUPTA opened 1 week ago
Latest commit: 5748268aad4909de7a572d6588900e64ab48fce9
The changes in this PR will be included in the next version bump.
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
@BatuhanW Sure will get this updated
It would be better to add a metadata prop to the show method this way any data can be passed down...
Updated the test cases and metadata prop
Updated the code for build failure.
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(); };`