rkit / react-select2-wrapper

Wrapper for Select2
MIT License
163 stars 97 forks source link

Uncaught TypeError: $element.data is not a function #79

Open rahulrkr08 opened 6 years ago

rahulrkr08 commented 6 years ago

I am getting error when using below example, Example:

<Select2 multiple data={['bug', 'feature', 'documents', 'discussion']}
                    value={ ['feature'] }
                    options={ { placeholder: 'search by tags' } }
                />

Error: Uncaught TypeError: $element.data is not a function

Can anyone help ?

rkit commented 6 years ago

I can't reproduce it.

kipperek commented 6 years ago

Probably You are importing wrapper like that: import Select2 from 'Select2' change it to: import Select2 from 'react-select2-wrapper'