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

Feature: Frames ref for submitCard() #31

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

audrius-sav
Copy link

Hey @ioan-ghisoi-cko, @dani-z!
Until now, there was no way to submit Frames form without using your SubmitButton as Frames's child. However, this creates an issue if we want to use our own custom button, or to control the form from up the component tree.

I added the ability to pass ref to Frames wrapper, which exposes submitCard() method. This way you can trigger form submission whenever you want.
Please let me know if I can improve anything.

I think this would also solve another user's issue #29.

@audrius-sav
Copy link
Author

Hi, @ioan-ghisoi-cko, any chance this could be looked into soon?

@jamesisaac
Copy link

This is useful for better consistency with frames-react. Another nice addition on top of this would be if submitCard returned response like in frames-react.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants