Skip to content

Commit 7ad2b73

Browse files
Update app controls (windmill-labs#309)
1 parent 5b8b657 commit 7ad2b73

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

docs/apps/3_app-runnable-panel.mdx

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,16 @@ Use the `getAgGrid` function to get the ag-grid instance of a table.
260260
getAgGrid(id: string)
261261
```
262262

263+
### setSelectedIndex
264+
265+
Use the `setSelectedIndex` function to select a row in a table or an AG Grid table.
266+
267+
#### Syntax
268+
269+
```js
270+
setSelectedIndex(id: string, index: number)
271+
```
272+
263273
### setValue
264274

265275
The `setValue` function is meant to set or force the value of a component. This can be convenient in cases where connection is not the easiest pattern.
@@ -282,6 +292,7 @@ Note that it's a bad idea to mix dynamic default value and setValue together.
282292
- [Slider](./4_app_configuration_settings/slider.mdx)
283293
- [Select](./4_app_configuration_settings/select.mdx)
284294
- [Text](./4_app_configuration_settings/text.mdx)
295+
- [Rich Text Editor](./4_app_configuration_settings/rich_text_editor.mdx)
285296

286297
#### Parameters
287298

@@ -300,17 +311,16 @@ Button and Form components can trigger other components to recompute. For exampl
300311
Caching an app inline script means caching the results of that script for a certain duration. If the script is triggered with the same inputs during the given duration, it will return the cached result.
301312

302313
<video
303-
className="border-2 rounded-xl object-cover w-full h-full"
304-
controls
305-
src="/videos/caching_app.mp4"
314+
className="border-2 rounded-xl object-cover w-full h-full"
315+
controls
316+
src="/videos/caching_app.mp4"
306317
/>
307318

308-
<br/>
319+
<br />
309320

310321
You can enable caching for an app inline script directly its editor settings. Here's how you can do it:
311322

312323
1. **Settings**: From the Code Editor, go to the top bar and pick the `Cache` tab.
313-
314324
2. **Enable Caching**: To enable caching, toggle on "Cache the results for each possible inputs" and specify the desired duration for caching results (in seconds.)
315325

316326
In the above example, the result of step the script will be cached for 5 minutes. If `Inline Script 0` is re-triggered with the same input within this period, Windmill will immediately return the cached result.

0 commit comments

Comments
 (0)