ui.Select.setPlaceholder
Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
Ustawia tekst zastępczy elementu select, który jest wyświetlany, gdy nie wybrano żadnej wartości.
Zwraca ten wybór.
Wykorzystanie | Zwroty |
---|
Select.setPlaceholder(placeholder) | ui.Select |
Argument | Typ | Szczegóły |
---|
to: ui.select | ui.Select | Instancja ui.Select. |
placeholder | Ciąg znaków | Tekst zastępczy elementu select. |
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-26 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-26 UTC."],[[["\u003cp\u003eThe \u003ccode\u003esetPlaceholder\u003c/code\u003e method allows you to define the text displayed in a select dropdown when no option is selected.\u003c/p\u003e\n"],["\u003cp\u003eThis method accepts the placeholder text as an argument and can be chained with other ui.Select methods for a fluid coding experience.\u003c/p\u003e\n"],["\u003cp\u003eIt ultimately returns the \u003ccode\u003eui.Select\u003c/code\u003e instance, enabling further method calls if desired.\u003c/p\u003e\n"]]],["The `Select.setPlaceholder()` method sets the placeholder text for a select element, displayed when no value is chosen. It accepts a string argument (`placeholder`) representing the desired text. The method, when called on a `ui.Select` instance, modifies the instance and returns the same `ui.Select` instance, allowing for method chaining. The `ui.Select` instance is passed as the argument 'this'.\n"],null,["# ui.Select.setPlaceholder\n\n\u003cbr /\u003e\n\nSets the select's placeholder text, which is shown when no value is selected.\n\n\u003cbr /\u003e\n\nReturns this select.\n\n| Usage | Returns |\n|--------------------------------------|-----------|\n| Select.setPlaceholder`(placeholder)` | ui.Select |\n\n| Argument | Type | Details |\n|-------------------|-----------|--------------------------------|\n| this: `ui.select` | ui.Select | The ui.Select instance. |\n| `placeholder` | String | The select's placeholder text. |"]]