Hey 
You can put two conditions (and combine them with a and/or depending on your use case) for your “X” visibility :
- When searchbox value is not empty → When user pressed enter and already selected a value
- And/Or when searchbox is focused → When the typed text is changed.
Hoping this helps ! 