How can I display an element only if any value has been selected from an entity select field? I have a field on a webform (Drupal 8) that should be displayed only when a user has selected one or more options from an entity select field regardless which options are selected.
The available conditional logic options in webform do not seem to include such state. I have searched online and looked through the example_element_states.yml in the webform module and all select related examples specify a particular option value as the conditional logic.
Has anyone encountered and resolved such issue?
Got it! You need to check for a value greater than 0. 
user:
  '#type': webform_entity_select
  '#title': User
  '#multiple': true
  '#target_type': user
  '#selection_handler': 'default:user'
  '#selection_settings':
    include_anonymous: false
    filter:
      type: _none
text:
  '#type': textfield
  '#title': Text
  '#states':
    visible:
      ':input[name=&quot;user[]&quot;]':
        value:
          greater: '0'

I guess in PHP that must be:
$form['text']['#states'] = [
  'visible' =&gt; [
    ':input[name=&quot;user[]&quot;]' =&gt; [
      'value' =&gt; [
        'greater' =&gt; &quot;0&quot;,
      ]
    ]
  ]
];