cibernox / ember-power-select-typeahead

Typeahead component built on top of ember-power-select
MIT License
37 stars 57 forks source link

Cannot read property 'appendChild' of null from basic-dropdown-content.js #102

Open kenjim83 opened 3 years ago

kenjim83 commented 3 years ago

Hi, I'm getting this runtime error when selecting a result from the typeahead dropdown:

Uncaught (in promise) TypeError: Cannot read property 'appendChild' of null
    at BasicDropdownContent.animateOut (basic-dropdown-content.js:202)

This comment seems to identify the issue: https://github.com/cibernox/ember-basic-dropdown/issues/540#issuecomment-674521928

I'm using ember-power-select-typeahead 0.8.1 ember-source 3.23.1

kenjim83 commented 3 years ago

FWIW, I confirmed I don't see this issue when passing @animationEnabled={{false}} to

cibernox commented 3 years ago

Thanks for reporting. Can you check in the package-lock.json the version of this addon and of ember-power-select do you have installed?

DavertMik commented 3 years ago

I can confirm the same issue happened to me:

➜ yarn list ember-basic-dropdown
yarn list v1.22.5
├─ ember-basic-dropdown@3.0.12
├─ ember-power-select-typeahead@0.8.1
│  └─ ember-basic-dropdown@2.0.15
└─ ember-power-select-with-create@0.7.0
   └─ ember-basic-dropdown@2.0.15
➜ yarn list ember-power-select  
yarn list v1.22.5
warning Filtering by arguments is deprecated. Please use the pattern option instead.
├─ ember-power-select-typeahead@0.8.1
│  └─ ember-power-select@3.0.6
├─ ember-power-select-with-create@0.7.0
│  └─ ember-power-select@3.0.6
└─ ember-power-select@4.1.0
DavertMik commented 3 years ago

@cibernox thanks for all your work on these add-ons! They are really awesome saved me hours of my life 🤩

I assume this addon should be upgraded to use ember-power-select: ^4, in this case, this error should be gone. What do you think? Is it compatible?

DavertMik commented 3 years ago

To fix this issue on for my project I had to go through all PowerSelect and add @animationEnabled={{false}} Not really sure why I had to do this if my main ember-power-select is 4.1.0... Looks like one of these addons are overriding it and takes an older version into pipeline