frames-react-native icon indicating copy to clipboard operation
frames-react-native copied to clipboard

Feature: Frames `ref` for `submitCard()`

Open audrius-sav opened this issue 8 months ago • 2 comments

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 avatar Oct 10 '23 14:10 audrius-sav

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

audrius-sav avatar Oct 17 '23 11:10 audrius-sav

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.

jamesisaac avatar Apr 08 '24 10:04 jamesisaac