ui.Select.setValue
Sets the selected value.
Returns this select.
Usage | Returns |
---|
Select.setValue(value, trigger) | ui.Select |
Argument | Type | Details |
---|
this: ui.select | ui.Select | The ui.Select instance. |
value | String | The value to select. |
trigger | Boolean, optional | Whether to trigger onChange callbacks when the value property changes. Defaults to true. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-10-06 UTC.
[null,null,["Last updated 2023-10-06 UTC."],[[["`setValue()` allows you to programmatically set the selected value of a `ui.Select` instance."],["The method accepts the desired `value` as a string and an optional `trigger` boolean to control onChange callback execution."],["Using `setValue()` returns the `ui.Select` instance, enabling method chaining."]]],["The `Select.setValue()` method sets the selected value within a `ui.Select` instance. It accepts a `value` (string) and an optional `trigger` (boolean) argument, defaulting to true, which controls whether onChange callbacks are executed. This method returns the `ui.Select` instance itself, allowing for method chaining.\n"]]