fixed empty items delete in create plan

This commit is contained in:
2023-12-16 22:19:08 +03:00
parent 0d86fd7ad0
commit 3e74448123

View File

@@ -100,6 +100,9 @@ class Create extends Component
$this->$options_type['items'][] = $this->input_items_1;
$this->$options_type['items'][] = $this->input_items_2;
$this->$options_type['items'][] = $this->input_items_3;
// delete empty value in items
$this->$options_type['items'] = array_filter($this->$options_type['items'], fn($item) => !empty($item));
$this->reset('input_items_1');
$this->reset('input_items_2');
$this->reset('input_items_3');