From bd501bce867f823298ccc9670ad3c023fc0a2e2a Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Fri, 11 Nov 2022 13:58:22 +0000 Subject: [PATCH] - Added the multiple value selection --- src/Form/UiSelect.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Form/UiSelect.php b/src/Form/UiSelect.php index 499fc4b..9e1d937 100644 --- a/src/Form/UiSelect.php +++ b/src/Form/UiSelect.php @@ -79,6 +79,11 @@ class UiSelect extends UiElement implements Extension { protected function isSelected($check, $value, bool $strict = true) : bool { + if ( is_array($value) ) { + return in_array($check, $value, $strict); + } + + return $strict ? $check === $value : $check == $value; } }