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

[docs] ; causes query to fail #3119

Merged
merged 2 commits into from
Jan 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/data/toolpad/getting-started/first-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ Make sure to [install Node.js](https://nodejs.org/en) on your system.

2. Click on the **Bind** button next to the breed parameter value, and add the following JavaScript expression in the binding editor:

<!-- prettier-ignore -->
```jsx
dataGrid.selection?.[0] ?? 'akita';
dataGrid.selection?.[0] ?? 'akita'
```

This will use the selected value from the Data Grid, and default to the "akita" breed when no row has been selected.
Expand All @@ -122,8 +123,9 @@ Make sure to [install Node.js](https://nodejs.org/en) on your system.

3. Then bind the query **URL** to the following JavaScript expression:

<!-- prettier-ignore -->
```js
`https://dog.ceo/api/breed/${parameters.breed}/images/random`;
`https://dog.ceo/api/breed/${parameters.breed}/images/random`
```

{{"component": "modules/components/DocsImage.tsx", "src": "/static/toolpad/docs/getting-started/first-app/step-10.png", "alt": "URL binding", "caption": "Binding the URL to a JavaScript expression", "indent": 1 }}
Expand Down
Loading