Skip to content

Commit

Permalink
NULL values should also trigger React selects to auto-select the firs…
Browse files Browse the repository at this point in the history
…t value

Fixes #124
  • Loading branch information
kevincupp committed Feb 12, 2019
1 parent 0dd0069 commit 6bfead3
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -95,7 +95,7 @@
// If $value is FALSE and we're rendering the field with React, FALSE
// probably isn't a valid value and probably came from asking the config
// library for the field's value in form/field.php
if ($no_radio_value && $value === FALSE && isset($normalized_choices[0]['value']))
if ($no_radio_value && ($value === FALSE || is_null($value)) && isset($normalized_choices[0]['value']))
{
$value = $normalized_choices[0]['value'];
}
Expand Down

0 comments on commit 6bfead3

Please sign in to comment.