From 68de8f3d1ab579113f28bdddb2a5dc7ec367fa6a Mon Sep 17 00:00:00 2001 From: Bharat Kashyap Date: Wed, 24 Jan 2024 13:34:53 +0530 Subject: [PATCH 1/2] fix: `;` causes query to fail --- docs/data/toolpad/getting-started/first-app.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/data/toolpad/getting-started/first-app.md b/docs/data/toolpad/getting-started/first-app.md index 5328d43ec16..6ac495d84a3 100644 --- a/docs/data/toolpad/getting-started/first-app.md +++ b/docs/data/toolpad/getting-started/first-app.md @@ -113,7 +113,7 @@ 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: ```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. @@ -123,7 +123,7 @@ Make sure to [install Node.js](https://nodejs.org/en) on your system. 3. Then bind the query **URL** to the following JavaScript expression: ```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 }} From 0f549b174af8920cff03ad46b7a2ee1cc5d757fb Mon Sep 17 00:00:00 2001 From: Bharat Kashyap Date: Wed, 24 Jan 2024 14:19:04 +0530 Subject: [PATCH 2/2] fix: ignore prettier --- docs/data/toolpad/getting-started/first-app.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/data/toolpad/getting-started/first-app.md b/docs/data/toolpad/getting-started/first-app.md index 6ac495d84a3..36ddfc674c6 100644 --- a/docs/data/toolpad/getting-started/first-app.md +++ b/docs/data/toolpad/getting-started/first-app.md @@ -112,6 +112,7 @@ 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: + ```jsx dataGrid.selection?.[0] ?? 'akita' ``` @@ -122,6 +123,7 @@ Make sure to [install Node.js](https://nodejs.org/en) on your system. 3. Then bind the query **URL** to the following JavaScript expression: + ```js `https://dog.ceo/api/breed/${parameters.breed}/images/random` ```