$api?. => $api. when possible

Now that this stuff has all been cleaned up with useXContext functions
This commit is contained in:
Ryan Gossiaux
2021-12-18 23:56:37 -08:00
parent 70910c05b0
commit 305dc1543f
13 changed files with 50 additions and 50 deletions

View File

@@ -91,11 +91,11 @@
$: propsWeControl = {
"aria-activedescendant":
$api?.activeOptionIndex === null
$api.activeOptionIndex === null
? undefined
: $api?.options[$api.activeOptionIndex]?.id,
: $api.options[$api.activeOptionIndex]?.id,
"aria-labelledby": $labelRef?.id ?? $buttonRef?.id,
"aria-orientation": $api?.orientation,
"aria-orientation": $api.orientation,
id,
role: "listbox",
tabIndex: 0,
@@ -115,6 +115,6 @@
{...$$restProps}
{...propsWeControl}
>
<slot open={$api?.listboxState === ListboxStates.Open} />
<slot open={$api.listboxState === ListboxStates.Open} />
</ul>
{/if}