Skip to content

Commit

Permalink
stan
Browse files Browse the repository at this point in the history
  • Loading branch information
mvorisek committed Feb 14, 2024
1 parent e88f2ea commit 007761a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/Form/Control/Dropdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ protected function _addCallBackRow($row, $key = null): void
$res = ($this->renderRowFunction)($row);
$this->_tItem->set('value', $this->getApp()->uiPersistence->typecastSaveField($this->model->getField($this->model->idField), $row->getId()));
} else {
$res = ($this->renderRowFunction)($row, $key);
$this->_tItem->set('value', (string) $res['value']);
$res = ($this->renderRowFunction)($row, $key); // @phpstan-ignore-line https://github.com/phpstan/phpstan/issues/10283#issuecomment-1850438891
$this->_tItem->set('value', (string) $res['value']); // @phpstan-ignore-line https://github.com/phpstan/phpstan/issues/10283
}

$this->_tItem->set('title', $res['title']);
Expand Down
4 changes: 2 additions & 2 deletions src/Form/Control/DropdownCascade.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function getNewValues($id): array
if ($this->renderRowFunction) {
$res = ($this->renderRowFunction)($row);
$values[] = [
'value' => $res['value'],
'value' => $this->getApp()->uiPersistence->typecastSaveField($model->getField($model->idField), $row->getId()),
'text' => $res['title'],
'name' => $res['title'],
];
Expand All @@ -108,7 +108,7 @@ public function getNewValues($id): array
* of possible values.
*
* @param list<array{value: string, text: mixed, name: mixed}> $values
* @param mixed $value the current field value
* @param mixed $value the current field value
*/
private function getJsValues(array $values, $value): array
{
Expand Down

0 comments on commit 007761a

Please sign in to comment.