import React, {Component, useEffect, useState} from 'react';
import { f7, Page, Navbar, List, ListItem, BlockTitle, ListButton, Popover, Popup, View, Link, Sheet } from "framework7-react";
import { Device } from '../../../../common/mobile/utils/device';
const PageDropdownList = props => {
const listItems = props.listItems;
return (
{listItems.length && listItems.map((elem, index) => (
props.onChangeItemList(elem.value)}>
))}
);
};
class DropdownListView extends Component {
constructor(props) {
super(props);
}
render() {
return (
Device.isPhone ?
:
);
}
}
const DropdownList = props => {
useEffect(() => {
if(Device.isPhone) {
f7.sheet.open('#dropdown-list-sheet', true);
} else {
f7.popover.open('#dropdown-list-popover', '#dropdown-list-target');
}
return () => {}
});
return (
);
};
export default DropdownList;