Not working with Dialog on IOS
Hi,
Have anyone already implement it on a DIalog?
In my case, i put the component on a Dialog and works on Android just fine, but in IOS it does not appear
Here's my component:
`import React, { useEffect, useState } from 'react'; import { useTranslation } from 'react-i18next'; import { View } from 'react-native'; import Dialog from 'react-native-dialog'; import { ScrollPicker } from 'react-native-wheel-scrollview-picker'; import { IOption } from '../SelectOneMenu'; import { SelectedText, UnselectedText } from './styles';
('react-native-date-time-scroll-picker');
export interface ScheduleDialogProps { scheduleDialogVisible: boolean; handleCancelDialog: Function; }
const ScheduleDialogComponent: React.FC<ScheduleDialogProps> = ({
scheduleDialogVisible,
handleCancelDialog,
}) => {
const { t, i18n } = useTranslation();
const [selectOptions, setSelectOptions] = useState<Array<IOption>>([]);
const [selectedItem, setSelectedItem] = useState
useEffect(() => { setSelectOptions(['teste1', 'teste2', 'teste3']); }, []);
return ( <View> <Dialog.Container visible={scheduleDialogVisible}> <Dialog.Title style={{ textAlign: 'center', }} > {t('SCHEDULE_POSTS.TITLE')} </Dialog.Title>
<ScrollPicker
dataSource={selectOptions}
selectedIndex={
selectedItem == null ? 0 : selectOptions.indexOf(selectedItem)
}
renderItem={(data, index, selectedIndex) => {
if (selectedIndex) {
setSelectedItem(data);
return <SelectedText>{data} </SelectedText>;
}
return <UnselectedText>{data} </UnselectedText>;
}}
onValueChange={(data, selectedIndex) => {
<UnselectedText>{data} </UnselectedText>;
}}
wrapperHeight={180}
wrapperWidth={10}
itemHeight={60}
highlightColor="#FFFFFF"
wrapperColor="#FFFFFF"
highlightBorderWidth={2}
/>
<Dialog.Button
style={{
fontSize: 14,
fontFamily: 'Fire-Sans',
fontStyle: 'normal',
lineHeight: 17,
color: '#80808F',
marginRight: 16,
}}
label={t('GENERAL.BUTTON.CANCEL')}
onPress={() => handleCancelDialog()}
/>
</Dialog.Container>
</View>
); };
export default ScheduleDialogComponent; `
anyone can help?