How can I implement a dynamic dependent dropdown?