Example (deprecated): Remove duplicates from connected dropdown options

I tried everything and cannot make it work.
Can someone help me with this? I can’t make it to work. I know how to add the element, rename it, but every time I go on preview mode and enter something in the search box, everything disappear.