Set autocomplete 'textField' to lookup sub object property

1 Answer 70 Views
AutoComplete
Wreeecks
Top achievements
Rank 2
Iron
Iron
Iron
Wreeecks asked on 23 Dec 2021, 05:03 AM | edited on 23 Dec 2021, 05:05 AM

Is it possible for `textField` to lookup a value from a sub object property?

I've read this documentation, and it's possible to set the textField to lookup to an object property. However,  in my case, I'm handling a structured json response, see the data structure below.

I need to set textfield to `member.name`. How do I do this? TIA!


{
  results: [
    { 
     member: { 
       id: 123,
       name: 'John Doe'
     } 
     address: {
      line1: 'aaaaa',
      line2: 'bbbb'
    },{ 
     member: { 
       id: 124,
       name: 'jane smith'
     } 
     address: {
      line1: 'aaaaa',
      line2: 'bbbb'
    },
   }
  ],
pagination: {
 page: 1,
 total: 100,
}
}

1 Answer, 1 is accepted

Sort by
0
Accepted
Wreeecks
Top achievements
Rank 2
Iron
Iron
Iron
answered on 23 Dec 2021, 05:37 AM | edited on 23 Dec 2021, 05:38 AM

i've figure out how to do this. turns out that `member.name` actually works. 

 

https://stackblitz.com/edit/react-qlqznf-jt6nuh?file=app/main.tsx

Kiril
Telerik team
commented on 23 Dec 2021, 07:54 AM

Thank you for sharing your solutions with the KendoReact community.

If you have further questions, please let us know and we will be happy to help.

Tags
AutoComplete
Asked by
Wreeecks
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Wreeecks
Top achievements
Rank 2
Iron
Iron
Iron
Share this question
or