From 84def2a03a70ef6471fe537e84771f6d6a81b608 Mon Sep 17 00:00:00 2001 From: Michael Albrecht Date: Fri, 17 Jan 2025 10:22:41 +0100 Subject: [PATCH] [Numeric uses string values] Internally Pimcore uses string in the Numeric Editable - so we have to cast it (#39) --- src/EditableDialogBox/EditableItem/NumericItem.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/EditableDialogBox/EditableItem/NumericItem.php b/src/EditableDialogBox/EditableItem/NumericItem.php index 4605c66..4d97308 100644 --- a/src/EditableDialogBox/EditableItem/NumericItem.php +++ b/src/EditableDialogBox/EditableItem/NumericItem.php @@ -27,14 +27,14 @@ public function setDefaultValue(int $value): static throw new \InvalidArgumentException(\sprintf('Default value "%d" is out of bounds: [%d,%d]', $value, $this->min, $this->max)); } - return $this->addConfig('defaultValue', $value); + return $this->addConfig('defaultValue', (string) $value); } protected function getConfig(): array { return [ - 'minValue' => $this->min, - 'maxValue' => $this->max, + 'minValue' => (string) $this->min, + 'maxValue' => (string) $this->max, ]; } }