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

Passing functions in payload #396

Open
ice-cap0 opened this issue Nov 2, 2024 · 1 comment
Open

Passing functions in payload #396

ice-cap0 opened this issue Nov 2, 2024 · 1 comment

Comments

@ice-cap0
Copy link

ice-cap0 commented Nov 2, 2024

getting undefined for all callbacks I pass in payload for SheetManager.show

is this expected ?

@ice-cap0
Copy link
Author

ice-cap0 commented Nov 2, 2024

the goal here is to build an imperative, generic, typesafe "dialog" sheet, that you can call like

SheetManager.show('alert-sheet', payload: {
  title: 'Are you sure you want to make this booking?'
  onPressOk: createBooking,
})
.then(booking =>

where booking would be of type: createBooking return type.
for this to work the ActionSheet needs to be able to receive functions in its payload

inb4 u can just return a boolean and do the processing afterwards.
i'd like to be able to do other things while the sheet is open e.g. showing loading/progress

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

No branches or pull requests

1 participant