-
Notifications
You must be signed in to change notification settings - Fork 734
Expose new impertive methods on picker #1988
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good, I wrote a few small comments
@@ -12,6 +12,12 @@ export interface RenderCustomOverlayProps { | |||
toggleExpandable: () => void; | |||
} | |||
|
|||
export interface ExpandableOverlayMethods { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can extend this interface in the one above (RenderCustomOverlayProps), just for making it look better
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
@@ -38,6 +39,7 @@ const filters = [ | |||
]; | |||
|
|||
export default class PickerScreen extends Component { | |||
picker = React.createRef(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider exporting the relevant type and adding it here (for autocomplete and to resolve the ts error from line 290)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I exported the type.
Resolving the TS error on line 290 is a little more complicated than that, but at least there's now the autocomplete on the ref
Description
Expose new imperative methods on picker component to allow opening expandable modal
WOAUILIB-2573
Changelog
Expose new imperative methods on picker component to allow opening expandable modal (openExpandable, closeExpandable, toggleExpandable)