0

I have used materialize.css before. Recently I tried using the new version Alpha 1.0 but the Chips aren't getting added.

I used the code from the docs

<div class="chips"></div>

and include this in my js file

 $('.chips').chips();

But I keep getting the following error on my console

materialize.min.js:6 Uncaught TypeError: Cannot read property 'addEventListener' of undefined

What should I do to resolve it?

yuriy636
  • 11,171
  • 5
  • 37
  • 42
Shahrukh Mohammad
  • 985
  • 2
  • 17
  • 33

1 Answers1

2

This issue was fixed in 1.0.0-alpha.2.

Check the changelog at https://github.com/Dogfalo/materialize/releases/tag/1.0.0-alpha.2:

1.0.0-alpha.2 (November 30th)


  • Chips
    • Fixed and standardized chips callback parameters

Use that version and it will work fine.

yuriy636
  • 11,171
  • 5
  • 37
  • 42
  • Thanks for your answer @yuriy636, can you please answer [this one](https://stackoverflow.com/questions/47898366/getting-chips-data-in-materialize-css-through-post) – Shahrukh Mohammad Dec 20 '17 at 16:05