Fix Ionic popover trigger warnings
This commit is contained in:
1 parent
3caf21794d
commit
493a969ca8
7 files changed
+43
-30
No files matched your search
@@ -24,10 +24,10 @@ export const SoundRingSelector = memo(function SoundRingSelector({
|
||||
return (
|
||||
<>
|
||||
<IonButton
|
||||
id="sound-ring-selector-trigger"
|
||||
className="sound-ring-selector-trigger"
|
||||
fill="clear"
|
||||
disabled={soundIds.length === 0}
|
||||
onClick={(event) => popover.open(event.nativeEvent)}
|
||||
aria-label={focusedSound ? `Selected ring: ${focusedSound.label}` : 'Select a sound ring'}
|
||||
aria-haspopup="dialog"
|
||||
aria-expanded={popover.isOpen}
|
||||
@@ -46,12 +46,12 @@ export const SoundRingSelector = memo(function SoundRingSelector({
|
||||
|
||||
<IonPopover
|
||||
className="sound-ring-popover"
|
||||
trigger="sound-ring-selector-trigger"
|
||||
triggerAction="click"
|
||||
isOpen={popover.isOpen}
|
||||
event={popover.event}
|
||||
reference="event"
|
||||
side="bottom"
|
||||
alignment="end"
|
||||
dismissOnSelect
|
||||
onDidPresent={popover.onDidPresent}
|
||||
onDidDismiss={popover.onDidDismiss}
|
||||
>
|
||||
<div className="sound-ring-options" role="group" aria-label="Sound rings">
|
||||
@@ -63,7 +63,10 @@ export const SoundRingSelector = memo(function SoundRingSelector({
|
||||
className="sound-ring-option"
|
||||
fill={selected ? 'solid' : 'clear'}
|
||||
aria-pressed={selected}
|
||||
onClick={() => onSelectSound(soundId)}
|
||||
onClick={() => {
|
||||
popover.close();
|
||||
onSelectSound(soundId);
|
||||
}}
|
||||
>
|
||||
<span className="sound-ring-option-content">
|
||||
<span
|
||||
|
||||
Reference in new issue
Block a user