findModel Callable is not firing in EditableColumnAction

Web Tips Q & ACategory: Krajee Yii2 ExtensionsfindModel Callable is not firing in EditableColumnAction
papajoedee asked 2 years ago

Recently ran into your web tip ( to simplify the editable cells setup.  I followed the example and it works fine.  However, I need to modify the model access, so I coded the findModel parameter like so: public function actions(){ return ArrayHelper::merge(parent::actions(), [ \’editalloc\’ => [ \’class\’ => EditableColumnAction::className(), \’modelClass\’ => Allocation::className(), \’findModel\’ => function ($id, $action) { $model = AnotherAlloc::findOne($id); // some special handling return $model; }, ], ]);} However, it does not appear that the findModel callable is ever fired.  I am missing something< Mahalo, Joe

Login or register to contribute or comment.

Login   Register