picker icon indicating copy to clipboard operation
picker copied to clipboard

[IOS] Add a callback called when focus method is invoked

Open davifelix5 opened this issue 1 year ago • 0 comments

Hello, maintainers.

I am using the library with react-hook-form and my goal is to focus programmatically on my custom Picker UI for IOS using the setFocus method, which works by calling the element's ref. It works perfect on Android because of the focus/setFocus API, but unfortunately it is not possible to trigger anything in my IOS custom Picker UI after focus because I cannot know when the element is being focused.

Is it possible add a callback for IOS here? Is this a good approach? What do you think?

In my point of view, a patch like this would aggregate value because would allow developers to customize picker behavior on IOS without having to implement class components to redefine the focus method because of IOS behaviour.

Any thoughts?

davifelix5 avatar Sep 27 '24 00:09 davifelix5