support objects for typeahead items

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.