typeahead support for items that are object

Currently objects can't be used as items because the item is stored on the element as an attribute rather than as data. This simple change fixes that.