Alter-Entity-Autocomplete
Alter-Entity-Autocomplete copied to clipboard
Breaks entity_autocomplete configs in Drupal 9
When I use below code. All bundles are displayed regardless of the values specified in 'target_bundles'. Uninstalling the module fixes it.
core: Drupal 9.2.2
$form['participant'] = [
'#type' => 'entity_autocomplete',
'#title' => $this->t('Participant'),
'#weight' => '0',
'#target_type' => 'node',
'#selection_handler' => 'default',
'#selection_settings' => [
'target_bundles' => ['person'],
],
'#tags' => TRUE,
];