Fix datatable alias to be a single string (#4231)

Credit to @bennothommo
This commit is contained in:
Ben Thomson 2019-04-04 05:48:15 +08:00 committed by Luke Towers
parent eaaf8a6b3d
commit aee4205b44
1 changed files with 1 additions and 1 deletions

View File

@ -150,7 +150,7 @@ class DataTable extends FormWidgetBase
$config->dataSource = 'client';
if (isset($this->getParentForm()->arrayName)) {
$config->alias = $this->getParentForm()->arrayName . '[' . studly_case(HtmlHelper::nameToId($this->fieldName)) . 'datatable' . ']';
$config->alias = studly_case(HtmlHelper::nameToId($this->getParentForm()->arrayName . '[' . $this->fieldName . ']')) . 'datatable';
$config->fieldName = $this->getParentForm()->arrayName . '[' . $this->fieldName . ']';
} else {
$config->alias = studly_case(HtmlHelper::nameToId($this->fieldName)) . 'datatable';