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

Add a PaneButton to list of allowed widgets for NavigationPane #75

Closed
tobiasht opened this issue Sep 30, 2021 · 2 comments
Closed

Add a PaneButton to list of allowed widgets for NavigationPane #75

tobiasht opened this issue Sep 30, 2021 · 2 comments

Comments

@tobiasht
Copy link
Contributor

tobiasht commented Sep 30, 2021

Is your feature request related to a problem?
I want to call a function when pressing a button in the NavigationPane. For example pressing Save, at the moment the button will just navigate to a new screen.
image

Describe the solution you'd like
Add a new type PaneButton to the list of allowed widgets for items and footerItems. When pressing this button a function will be called instead of navigating to a new page.

Describe alternatives you've considered
Add a commandBar, which can be changed based on the selectedTabIndex

@bdlukaa
Copy link
Owner

bdlukaa commented Sep 30, 2021

you can use the onChanged callback to call a function when a button is pressed.

onChanged: (i) {
  if (i == 0); // first button was pressed
}

PaneButton is not an existing widget

@tobiasht
Copy link
Contributor Author

tobiasht commented Oct 1, 2021

Ah that's true. I can do some additional checks there. Thanks for the advice.

PaneButton was meant as a suggestion to make it more intuitive.

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

2 participants