(props)
| 127 | } |
| 128 | |
| 129 | function ListBox(props) { |
| 130 | let ref = React.useRef(undefined); |
| 131 | let {listBoxRef = ref, state} = props; |
| 132 | let {listBoxProps} = useListBox(props, state, listBoxRef); |
| 133 | |
| 134 | return ( |
| 135 | <ul |
| 136 | {...listBoxProps} |
| 137 | ref={listBoxRef} |
| 138 | style={{ |
| 139 | margin: 0, |
| 140 | padding: 0, |
| 141 | listStyle: 'none', |
| 142 | maxHeight: '150px', |
| 143 | overflow: 'auto' |
| 144 | }}> |
| 145 | {[...state.collection].map(item => ( |
| 146 | <Option key={item.key} item={item} state={state} /> |
| 147 | ))} |
| 148 | </ul> |
| 149 | ); |
| 150 | } |
| 151 | |
| 152 | function Option({item, state}) { |
| 153 | let ref = React.useRef<HTMLLIElement | null>(null); |
nothing calls this directly
no test coverage detected