expose selectedItem
support flex as attribute