ng2-select icon indicating copy to clipboard operation
ng2-select copied to clipboard

ng2-select with children not working in 1.2.0

Open TheBurgerShot opened this issue 9 years ago • 4 comments

Hi All,

In my application ng2-select does not show any suggestions when i'm using grouped data. I know that my syntax is correct, because without changing anything in my code it works fine when I install version 1.1.2.

Anyone else experiencing this? If so, as I mentioned, downgrading to 1.1.2 worked for me. If anyone knows what I could be missing or has a solution I'd like to hear!

Thanks in advance!

TheBurgerShot avatar Apr 05 '17 11:04 TheBurgerShot

Looks like it doesn't work on their site either http://valor-software.com/ng2-select/

psilospore avatar Apr 12 '17 18:04 psilospore

Newer version requires id of parent, so set and it will work. e.g.

  
public items:Array<any> = [
    {
      id: 1,
      text: 'India',
      children: [
        {id: 54, text: 'Mumbai'}
      ]
    },
    {
      id: 2,
      text: 'USA',
      children: [
        {id: 2, text: 'New York'},
        {id: 9, text: 'Washington DC'}
      ]
    }
    ]
  

shahjay748 avatar May 02 '17 09:05 shahjay748

Adding ID to the elements did solve the issue as @shahjay748 wrote. Thank you!

newerik avatar Jun 20 '17 09:06 newerik

Here dont work even with id

HigorSilvaRosa avatar Sep 14 '17 21:09 HigorSilvaRosa