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.

Remote mode : Page is set to 1 when I reset a filter

See original GitHub issue

I have a table that I use in remote mode.

If I set the properties like this :

data = <a list of 2 elements>
sizePerPage = 5
options.page = 2
fetchInfo.dataTotalSize=7

then it works fine. I see my two elements, and the page number 2 is highlighted.

But when I set a text filter to blank, or a custom filter to blank (I call filterHandler() with no parameters inside my custom filter), then the page 1 becomes highlighted in pagination list, and I can’t click on it or page 2. The props haven’t changed, so I see a mismatch between props.options.page=2 and state.currPage=1.

Do you have a workaround or a fix? I think this is the last bug left in my list and I’m a little bit frustrated ^^

Thanks in advance, and great work with this component, it’s very useful.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:20 (18 by maintainers)

github_iconTop GitHub Comments

2reactions
BenoitAvertycommented, Feb 15, 2017

Sorry, I wasn’t very clear because I just wrote all my findings in the same post. I’ll try to focus on the essential:

  • When a filter changes, the page becomes 1. This makes sense for the table in normal mode because the data changes.
  • In remote mode, this is problematic because it causes a mismatch between the page that’s in the table state, and the page that’s in the props.options object. The result is that clicking on the page links doesn’t work anymore. I think the reset should be made to options.page instead of the first page index (if it’s specified).
  • Another problem if that the page is reset to one even if the data/filter doesn’t change. For example, if the filter was already empty and it calls the handler again, then the page is reset to one even though nothing has changed. If the filter was set but has no effect, It also goes back to page one even though the data doesn’t change, which is counter intuitive inmy opinion.

I hope it’s more clear, don’t hesitate to ask if something isn’t clear

1reaction
BenoitAvertycommented, Feb 22, 2017

No problem, Do it when it’s convenient 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

I changed both filters in my Dyson hp04 Hot & Coo - Best Buy
“I changed both filters in my Dyson hp04 Hot & Cool Air Purifier. How do I set the controls to show all filters...
Read more >
Help library: Help library: Filter Indicator Will Not Reset - LG
To reset the water filter indicator on most models, press and hold the filter button for 3-5 seconds. Refer to your owner's manual...
Read more >
Reset Filter Sign Time; Scheduled Operation - PC-ARF1
(1) Select ''Reset Filter Sign Time'' From The ''Menu'' And Press ''Ok''. ... Scheduled Operation; Schedule Setting - Hitachi PC-ARF1 Operation Manual.
Read more >
User Account Control and remote restrictions - Windows Server
In this article. Introduction; How UAC remote restrictions work; How to disable UAC remote restrictions; UAC remote settings.
Read more >
User-Manual_C535.pdf - Winix
Remote Control and User Manual will be located on the top insert after the box is opened. Control Panel. Front Panel. (1) Pre-Filter....
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