Skip to content

Commit

Permalink
Rename to selectedValueIsEmpty
Browse files Browse the repository at this point in the history
  • Loading branch information
mirka committed Oct 16, 2024
1 parent 1c8b689 commit c550dec
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,14 +141,14 @@ function ToggleGroupControlOptionBase(
<Ariakit.Radio
disabled={ disabled }
onFocusVisible={ () => {
const selectedValueIsNullish =
const selectedValueIsEmpty =
toggleGroupControlContext.value === null ||
toggleGroupControlContext.value === '';

// Conditions ensure that the first visible focus to a radio group
// without a selected option will not automatically select the option.
if (
! selectedValueIsNullish ||
! selectedValueIsEmpty ||
toggleGroupControlContext.activeItemIsNotFirstItem?.()
) {
toggleGroupControlContext.setValue( value );
Expand Down

0 comments on commit c550dec

Please sign in to comment.