0
저는 ListView 구성 요소에 주력하고 있습니다.
여기 내 코드React Native : 어떻게 ListView에 집중할 수 있습니까?
class MyListView extends Component {
static propTypes = {
navigator: PropTypes.object.isRequired,
};
componentDidMount() {
this.listView.focus()
}
render() {
return (
<ListView
ref={ref => { this.listView = ref }}
contentContainerStyle={styles.listView}
dataSource={cloneWithRows(listDataSource)}
renderRow={(data) => <MyListViewCell
...
/>}
/>
)
}
}
export default MyListView
입니다하지만 난 기사를 많이 검색 한 "this.listView.focus는 함수가 아닙니다"그러나 나는 해결책을 찾을 수 없습니다처럼 그냥 오류를 반환합니다.
아이디어가 있으십니까?
'ListView'에'focus()'메소드가 있다고 생각합니까? – gus27
입력 요소에만 포커스가 있습니다. – vijayst