Méthode View.setQuery
Pour les vues impliquant des recherches, préremplissez la requête de recherche avec ces termes.
Signature
setQuery(query: string): View;
Détails
Facultatif |
Non |
Finale |
Non |
Protégée |
Non |
Statique |
Non |
Paramètres
Nom |
Type |
Facultatif |
Description |
query |
string |
Non |
|
Renvoie
View
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2024/11/08 (UTC).
[null,null,["Dernière mise à jour le 2024/11/08 (UTC)."],[[["The `setQuery` method allows you to prepopulate the search query within a view."],["This method is primarily used for views that involve search functionalities."],["It accepts a single parameter, `query`, which is a string representing the search terms to be pre-filled."],["Using `setQuery` is not optional and will modify the view directly."],["Upon execution, this method returns an instance of the `View` object."]]],["The core function `setQuery` allows for prepopulating a search query within a view. It accepts a single, mandatory string parameter named `query`. This function is not optional, final, protected, or static. Executing `setQuery` with a string will modify the view by pre-filling the search field with the provided terms, returning the modified View object.\n"]]