When I follow those steps, I see the following error in the console:
Uncaught TypeError: Cannot read properties of undefined (reading 'id')
at AllowClear._handleClear (select2.full.js:1907:40)
at DecoratedClass._handleClear (select2.full.js:598:32)
at HTMLSpanElement.<anonymous> (select2.full.js:1881:14)
at HTMLSpanElement.dispatch (jquery.js:5145:27)
at elemData.handle (jquery.js:4949:28)
I was expecting: the Select2 field will be cleared.
Prerequisites
master
branch of yii2-widget-select2.Steps to reproduce the issue
Create a Select2 filter with the "allowClear" plugin option and without "placeholder" option. Example:
Expected behavior and actual behavior
When I follow those steps, I see the following error in the console:
I was expecting: the Select2 field will be cleared.
Environment
Browsers
Operating System
Libraries
Isolating the problem