We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c3bbca3 + 5ecd2b6 commit 5da3ce3Copy full SHA for 5da3ce3
app/Livewire/CustomFieldSetDefaultValuesForModel.php
@@ -81,6 +81,12 @@ private function populatedSelectedValuesArray(): void
81
{
82
$this->fields->each(function ($field) {
83
$this->selectedValues[$field->db_column] = $this->getSelectedValueForField($field);
84
+
85
+ // if the element is a checkbox and the value was just sent to null, make it
86
+ // an array since Livewire can't bind to non-array values for checkboxes.
87
+ if ($field->element === 'checkbox' && is_null($this->selectedValues[$field->db_column])) {
88
+ $this->selectedValues[$field->db_column] = [];
89
+ }
90
});
91
}
92
0 commit comments