Drupal 8 Custom Composite Entity Select Field Does anyone have an example of how I add an Entity Select (Specifically a term reference) to a custom composite? 

Here's the code I've tired. The field with the title shows up but no select.

$elements['test_tax'] = [
  '#type' =&gt; 'entity_select',
  '#title' =&gt; t('Test Taxonomy'),
  '#target_type' =&gt; 'taxonomy_term',
  '#selection_handler' =&gt; 'default:taxonomy_term',
  '#selection_settings' =&gt; [
    'target_bundles' =&gt; [
      'my_terms' =&gt; 'my_terms'
    ],
    'sort' =&gt; [
      'field' =&gt; 'name',
      'direction' =&gt; 'ASC'
    ]
  ] 
];


I'm a front-end guy so I'm a bit out of my element in php...
I think you just need to change...

'#type' =&gt; 'entity_select',


...to...

'#type' =&gt; 'webform_entity_select',


In the Webform YAML source editor we are hiding the 'webform_*' prefixes, within custom code they have to included.

@see https://cgit.drupalcode.org/webform/tree/src/Element/WebformEntitySelect.php