naffiq / yii2-bridge

⚠️ REPO MOVED TO SEPARATE GROUP FOR MAINTAINABILITY
https://github.com/yii2-bridge/core
4 stars 3 forks source link

field relativeDropDown add ajax #17

Closed johnluxor closed 6 years ago

johnluxor commented 7 years ago

add ajax loading for select2

naffiq commented 6 years ago

The plan is to enable user an option to change behavior of index method of generated controllers in Gii. So if \Yii::$app->request->isAjax, the data will be returned, as if it was passed to relativeDropDown widget.

This data transformation will be used in both relativeDropDown and altered index widget, so moving this code to external helper is considered, but not mandatory.

naffiq commented 6 years ago

Here is short todo list:

naffiq commented 6 years ago

After implementing this functionality on couple of projects, I don't think that this should be generated but written by developers themselves. Select2 by kartik-v allows you to implement it easily.

Will add instructions to gitbook