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 params option for page navigation with button onClick event #1800

Closed
2 tasks done
RBerthier opened this issue Mar 25, 2023 · 1 comment · Fixed by #1876
Closed
2 tasks done

Add params option for page navigation with button onClick event #1800

RBerthier opened this issue Mar 25, 2023 · 1 comment · Fixed by #1876
Assignees
Labels
new feature New feature or request
Milestone

Comments

@RBerthier
Copy link

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Summary 💡

It seems not possible to add params option, when using page navigation when customising onClick event handler for button.

Examples 🌈

image

After selecting a page to navigate to when clicking on a button, I would expect to have the possibility to add n* params to the page navigation. I didn't find any to way to do so.

Motivation 🔦

I want to navigate from one page to another using params to specify some content.

For instance, I tried the Toolpad tutorial with the dog listing, and I created another page to display more details on a specific dog. For this second page I need to use a param in the page url to specify the dog I want to display information about. To navigate to the second page, I add a button on the first page, but I can't add the needed parameter.

@RBerthier RBerthier added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Mar 25, 2023
@Janpot
Copy link
Member

Janpot commented Mar 25, 2023

Yes 👍, makes sense. It looks like it originally was intended to be part of #76 but never got implemented. We'll use this issue to keep track of it.

Shaping:

  • if a page has parameters foo and bar

Image

  • setting navigation event handler to this page should show UI to bind those exact two parameters to constants, or to state in the page. Similar to how you can bind properties of components

@Janpot Janpot added new feature New feature or request and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Mar 25, 2023
@prakhargupta1 prakhargupta1 added this to the pro-code MVP milestone Mar 28, 2023
@apedroferreira apedroferreira self-assigned this Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants