Closed ifcanduela closed 9 years ago
Thank you @ifcanduela!
Do you have time for a working pull request that I could test afterwards?
Edit:
but this change might have unintended consequences if other widgets are used.
Mind extending this?
Sure: I´ve only changed the parts that made the EditableColumn widget work for me, and I don't have any experience with the remaining code of any of the two packages (I think it´s only the Editable widget, I´m talking about). Maybe I can setup a test project today.
I will prepare pull requests for both repos then, and if you have a test suite you can confirm it works.
I submitted a pull request for this repo (#15) and yii2-editable-widget (https://github.com/2amigos/yii2-editable-widget/pull/7)
Thank you so much @ifcanduela will update version tags
Hola Toni,
after composer update
ing my app, I see that there's an error in EditableAction.php. I will send a new pull request (for the editable-widget repo, actually). I'm really sorry for this.
Qué bochorno, madre mía.
The EditableColumn widget fails when used with models which have composite primary keys.
I traced the problem back to line 104 of EditableColumn.php, in which the
data-pk
field is passed alongside other HTML attributes to theHTML::a()
method. In my casedata-pk
contains a$key
that is an associative array, so the HTML attributes array is invalid.I fixed this by using
In line 100 of
EditableColumn.php
andin line 62 of
EditableAction.php
(from the other repo), but this change might have unintended consequences if other widgets are used.