Fix keyboard support on the dropdown (#1073)
* Fix: dropdown now supports accessibility labels and keyboard controls * Fix event propagation around the post dropdown
This commit is contained in:
parent
45da8a86c9
commit
1195f28992
3 changed files with 109 additions and 39 deletions
|
@ -6,7 +6,7 @@ import {
|
|||
NativeDropdown,
|
||||
DropdownItem as NativeDropdownItem,
|
||||
} from './NativeDropdown'
|
||||
import {Pressable} from 'react-native'
|
||||
import {EventStopper} from '../EventStopper'
|
||||
|
||||
export function PostDropdownBtn({
|
||||
testID,
|
||||
|
@ -141,8 +141,13 @@ export function PostDropdownBtn({
|
|||
].filter(Boolean) as NativeDropdownItem[]
|
||||
|
||||
return (
|
||||
<Pressable testID={testID} accessibilityRole="button">
|
||||
<NativeDropdown items={dropdownItems} />
|
||||
</Pressable>
|
||||
<EventStopper>
|
||||
<NativeDropdown
|
||||
testID={testID}
|
||||
items={dropdownItems}
|
||||
accessibilityLabel="More post options"
|
||||
accessibilityHint=""
|
||||
/>
|
||||
</EventStopper>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue