Creating the right behaviour for the dropbown component