Comments (1)
Since you are rendering by PJAX - the plugin needs to be reinitialized whenever there is pjax refresh. All Krajee widgets including Select2 provide a configuration option called pjaxContainerId
. Read about it in the code here.
You need to set pjaxContainerId
to the id matching your pjax container. So you must also in your code above set:
Pjax::begin(['options' => ['id => 'my-pjax-container']]);
/* other code */
Select2::widget([
'pjaxContainerId' => 'my-pjax-container'
//other options
]);
Pjax::end();
from yii2-widget-select2.
Related Issues (20)
- Create new theme krajee-bs5 for Bootstrap 5.x HOT 1
- Style out of place after update to V2.2.3 HOT 6
- When using tags, searched value appears as option and prevents Select-All HOT 1
- Standardize Krajee theme for each BS version & other style enhancements
- "Uncaught RangeError: Maximum call stack size exceeded" When using select multiple HOT 1
- "Select All" / "Unselect All" not shown when property hashVarLoadPosition is View::POS_READY (some options does not pass from PHP to JS)
- Release 2.2.4 HOT 2
- Error when using Select2
- Select2 select box lost CSS HOT 1
- Update multiple select styling Krajee BS5 theme
- How to encode space char? HOT 1
- Select2 does not allow you to enter text into the input if set to multiple => false But all OK if multiple => true
- Demo url not found , error4040 HOT 1
- Validation rule not work properly
- Yii2 Select2 Always Showing Placeholder Instead of Database Values
- Select2 error when using plugin option "allowClear"
- Select2 as ActiveForm field widget won't select HOT 2
- Select 2 widget: maximium text on multiple selection to select all HOT 1
- Demo / Documentation Site Offline HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yii2-widget-select2.