Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
screenId: PropTypes.string.isRequired,
// The parent category that is used to display
// the available categories in the drop down menu
parentCategory: PropTypes.any,
// CMS categories of the primary data
categories: PropTypes.array.isRequired,
// Primary CMS data to display
data: PropTypes.array.isRequired,
// The shortcut title
title: PropTypes.string.isRequired,
// The currently selected category on this screen
selectedCategory: PropTypes.object,
style: PropTypes.shape({
screen: Screen.propTypes.style,
list: ListView.propTypes.style,
emptyState: EmptyStateView.propTypes.style,
categories: DropDownMenu.propTypes.style,
}),
// actions
find: PropTypes.func.isRequired,
next: PropTypes.func.isRequired,
clear: PropTypes.func.isRequired,
setScreenState: PropTypes.func.isRequired,
};
static defaultProps = {
style: {
screen: {},
list: {},
emptyState: {},
categories: {},
export default class RemoteDataListScreen extends PureComponent {
static propTypes = {
// The shortcut title
title: string,
// Data items to display
// eslint-disable-next-line react/forbid-prop-types
data: array,
// Actions
next: func.isRequired,
// Component style
style: shape({
screen: Screen.propTypes.style,
list: ListView.propTypes.style,
emptyState: EmptyStateView.propTypes.style,
}),
};
static defaultProps = {
style: {
screen: {},
list: {},
emptyState: {},
},
};
constructor(props, context) {
super(props, context);
this.fetchData = this.fetchData.bind(this);
this.loadMore = this.loadMore.bind(this);
}