Skip to content

Commit

Permalink
Fix some fields using the first option automatically as the default v…
Browse files Browse the repository at this point in the history
…alue
  • Loading branch information
engram-design committed Aug 12, 2023
1 parent 47c2c44 commit 7d078ff
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/fields/Buttons.php
Expand Up @@ -190,7 +190,7 @@ protected function defaultValue(): array|string|null
}
}

return $options[0]['value'];
return null;
}

protected function translatedOptions(bool $encode = false, mixed $value = null, ?ElementInterface $element = null): array
Expand Down
2 changes: 1 addition & 1 deletion src/fields/Colours.php
Expand Up @@ -155,7 +155,7 @@ protected function defaultValue(): array|string|null
}
}

return $options[0]['value'];
return null;
}

protected function translatedOptions(bool $encode = false, mixed $value = null, ?ElementInterface $element = null): array
Expand Down
2 changes: 1 addition & 1 deletion src/fields/TextSize.php
Expand Up @@ -155,7 +155,7 @@ protected function defaultValue(): array|string|null
}
}

return $options[0]['value'];
return null;
}

protected function translatedOptions(bool $encode = false, mixed $value = null, ?ElementInterface $element = null): array
Expand Down
2 changes: 1 addition & 1 deletion src/fields/Width.php
Expand Up @@ -150,7 +150,7 @@ protected function defaultValue(): array|string|null
}
}

return $options[0]['value'];
return null;
}

protected function translatedOptions(bool $encode = false, mixed $value = null, ?ElementInterface $element = null): array
Expand Down

0 comments on commit 7d078ff

Please sign in to comment.