Open parneetkaur7729 opened 3 months ago
Hey, can you show some code or snack?
I'm assuming that the list you pass to numberOfItemsPerPageList
has values, because if it is an empty list, the Menu won't show up
constructor(props) {
super(props);
this.state = {
rows: [],
column: [],
max: 0,
items: [],
page: 0,
setData: {},
numberOfItemsPerPageList: [5, 25, 100],
itemsPerPage: 5,
selectedIndex: null, // Initialize selectedIndex
};
}
const { page, itemsPerPage, numberOfItemsPerPageList, items } = this.state;
<DataTable.Pagination
page={page}
numberOfPages={Math.ceil(this.state.max / itemsPerPage)}
onPageChange={page => this.setState({ page })}
label={${from + 1}-${to} of ${this.state.max}
}
numberOfItemsPerPageList={numberOfItemsPerPageList}
numberOfItemsPerPage={itemsPerPage}
onItemsPerPageChange={this.onItemsPerPageChange}
selectPageDropdownLabel={'Rows per page'}
/>
No, numberOfItemsPerPageList is not empty it have value 5,25,100
I couldn't reproduce it, if you can create a snack where I can see the code and try to reproduce it would be really helpful
here this is the snack of the code kindly take the reference for menu of numberoflistitems to resolve the issue of drop-down.
Hey, the snack you sent isn't using the last version, can you try with the last react-native-paper version 5.12.2
Hi, Checked with the latest version Here , still the issue is their dopdown is not coming for Android
Current behaviour
Added the template of the Datatable.pagination in which i added numberOfItemsPerPageList={numberOfItemsPerPageList} but when clicked on it its toogle state never get true and cant see the drop-down.
Expected behaviour
when clicked on the rows per page drop-down must open and accordingly items filteration could be done.
How to reproduce?
check the file datatablepagination-> search menu and check why it is not showing up.
Preview
https://github.com/callstack/react-native-paper/assets/109802307/200d5aec-e3e6-4a4f-8cf0-0535af36e7a9
What have you tried so far?
checked the values in the paper library and also tried to give data directly but nothing helped.
Your Environment