Angular 6 bind autocomplete to complex type

Tags: #<Tag:0x00007efc648c4bc0>

Hi

Is there a way to bind an autocomplete cell to a complex type?

Say for example you have a person object

{
firstName: “Dave”,
lastName: “Lister”,
userName: “listerdave”,
}

I would want to search for a list Persons, display the First Name + Last Name in the autocomplete selector, but when actually setting the value on the model, It would set the whole person object

Let me know if you need any further information

Thanks,

Hi @escape1979uk

The dropdown and autocomplete cell type accept only array of strings or numbers as a source. If your dataset is complex you’d need to parse it.

You can also try to use the handsontable cell type. Basically, it is a table inside a table.
https://handsontable.com/docs/6.0.1/demo-handsontable.html

hot in hot looks promising!

Thanks,
Matt

Great!

I guess that we can close the topic, but feel free to open a new one if needed.