- Issue created by @Akhil Babu
- 🇮🇳India Akhil Babu Chengannur
I think it's not possible to add placeholder to the sort widget as view applies the first sort option by default.
Also, it is not possible to add a placeholder to select2 facets from the UI. I added it in the following way
*/ function my_modul_preprocess_select(array &$variables) { $facet_id = $variables['attributes']['data-drupal-facet-id']; if (isset($variables['attributes']['data-select2-config'])) { $select2_config = Json::decode($variables['attributes']['data-select2-config']); $select2_config['placeholder']['text'] = t('New placeholder') $variables['attributes']['data-select2-config'] = Json::encode($select2_config); } }