Commit b10c8240 by Qiang Xue

Allow dash char in ActionColumn’s button names.

parent 3b1602ac
...@@ -122,7 +122,7 @@ class ActionColumn extends Column ...@@ -122,7 +122,7 @@ class ActionColumn extends Column
*/ */
protected function renderDataCellContent($model, $key, $index) protected function renderDataCellContent($model, $key, $index)
{ {
return preg_replace_callback('/\\{(\w+)\\}/', function ($matches) use ($model, $key, $index) { return preg_replace_callback('/\\{([\w\-]+)\\}/', function ($matches) use ($model, $key, $index) {
$name = $matches[1]; $name = $matches[1];
if (isset($this->buttons[$name])) { if (isset($this->buttons[$name])) {
$url = $this->createUrl($name, $model, $key, $index); $url = $this->createUrl($name, $model, $key, $index);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment