Handle templates correctly on selected item

The selected item value should be displayed when using templates (not all the text in the element).