question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Filter + Pagination returns empty rows

See original GitHub issue

`

class component extends Component {

	constructor(props) {
		super(props);
		this.state = {
			data: []
		};
	}

	componentDidMount() {
		let data = [];

		for (let i = 0; i < 100; i++) {
			data.push({
				Id: i,
				field1: 'field 1 value ' + i,
				field2: 'field 2 value ' + i
			});
		}

		this.setState({
			data: data
		});
	}

	render() {
			const
				columns = [{
					dataField: 'Id',
					text: 'Id',
					filter: textFilter()
				}, {
					dataField: 'field1',
					text: 'Field 1',
					filter: textFilter()
				}, {
					dataField: 'field2',
					text: 'Field 2',
					filter: textFilter()
				}];
			return (
				<BootstrapTable keyField='Id' data={ this.state.data } columns={ columns } filter={ filterFactory() }  pagination={ paginationFactory() }/>
			);

	}
}

export default component;

`

If you go to the page 4 and you type “5” in the filter input of the Field 2 column, it shows a list of empty rows.

If you do the same in the page 1 or 2, the shown results are fine. The issue comes when the size of the data after applying the filter is not long enough to fill the pages until the position where the user is.

The paginator (actually the position of the page) doesn’t change accordingly.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
AllenFangcommented, Jul 15, 2018

@aclopezffdc @rmartinezffdc

https://react-bootstrap-table.github.io/react-bootstrap-table2/blog/

Fixed on react-bootstrap-table-next@0.1.15 and react-bootstrap-table2-paginator@0.1.6 Please reopen this issue if the problem still remain, thanks

0reactions
aclopezffdccommented, Jul 18, 2018

thanks! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

after filtering Empty rows blank rows displayed while paging in ...
1 and JSF 2.0. I have used filtering and paging in the datatable. When I try to filter the selected data is displayed...
Read more >
after filtering Empty rows blank rows displayed while paging
I have problem with datatable using Primefaces 2.2.1 and JSF 2.0. I have used filtering and paging in the datatable. When I try...
Read more >
Row Filtering in Power BI and Power Query: Remove Blank ...
If you want to remove the row only if all values (across all columns) are empty, then Remove Blank Rows is a better...
Read more >
Report Builder - How to filter a chart for no blank
Solved: I have a paginated report I'm building in report builder and I wanted to add a chart ... The chart is below...
Read more >
Empty and null data points in paginated report charts
If your dataset query returns zero rows of data, a message is displayed at run time to indicate that no data can be...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found