Add selected state in dropdowns

- Fixes #1363
- Fixes #1056
toggleSelected should be declared as a method instead of as an action.