Skip to content

In dataset.js Why JSON.stringify(suggestion) #282

@nadnoslen

Description

@nadnoslen

I used Twitter Typeahead and moved over to this fork because it is maintained, thank you so much for taking on this project.

I am curious about a behaviour that is very different than that of my former Typeahead library. When pushing the suggestions into the elements data store, the suggestion is being turned to a JSON String rather than just simply storing the instance. My use cases are much more interested in working with the actual suggestion instance and not its mutated and mangled JSON equivalent.

Is there some way to achieve this without me forking and adjusting the dataset.js to actually store the suggestion instance in the element's data?

Background

I use Ember Data to query for my suggestions. These queries come back as collections of model instances. Those instances are what I want to interact with when a suggestion is chosen.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions