-
Notifications
You must be signed in to change notification settings - Fork 782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search result is reset when a rerender occur in the application with search and remote enabled. #1608
Comments
HI @widdde, what's situation cause the rerender? after you saving the result of the cell editing? |
Hi @AllenFang ! To reproduce the "feature": < BootstrapTable data={this.state.data} search remote={ this.remote } options={ { remote(remoteObj) { onCellEdit() { Create, for example, a div or a button or something that is updating the state on something on the page where you have the table.. onClick() { If you have searched something in the search field in the table, this will reset the search and show all data in this.state.data again.. As soon as i put the pointer in the searchfield again, the search result is back and when pressing the div, or button and changing another state the search is reset again and so on.. Hope you understand :) EDIT: Fixed the html tags that were missing by adding a space in the jsx tags. |
sure, I can reproduce it now, i think it's a critical bug, I will fix ASAP, thanks |
Thanks for fast response! |
@widdde bug fixed on |
Thank you very much for fast response to this bug! :)
One more question:
I Found a workaround for this, this workaround was to not set
remote={true}, but I could still use onCellEdit in options and the table
will call the onCellEdit. I thought this was bound to that remote was set
to true?
Kind regards,
Fredrik
…On Fri, Sep 15, 2017 at 4:17 PM, Allen ***@***.***> wrote:
@widdde <https://github.com/widdde> bug fixed on v4.0.4 please check it
again, thank you 👍
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1608 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AeTxBPAg-EAGfFvbcp4mulC3kv3Ym4Hrks5siobhgaJpZM4PSas3>
.
|
hmm. actually, it's a bug anyway. but |
Ok, thank you for your answer!
When will npm get the latest version (4.0.4)
Kind regards
Fredrik
Den 18 sep. 2017 3:19 em skrev "Allen" <notifications@github.com>:
… hmm. actually, it's a bug anyway. but remote do effect on a lots of
functionality.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1608 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AeTxBFzVwoasppb_uR7HSmlYJV-e2PqZks5sjm3ugaJpZM4PSas3>
.
|
This still happens to me at v Search input is resetted when |
I'm using BootstrapTable with "search" option (search field in top right corner that search in every field in the table) enabled and remote enabled for cellEdit (remote(remoteObj) {remoteObj.cellEdit=true;}. As soon as a rerender occur in the application the table resets the search and all items will be shown again. The search textfield still contains the search string that was written.
I don't think this is the expected behavior. Shouldn't the table keep the filter even if a re-render, caused by calling setState, occur in the application? I have tracked it down to the remote method, as soon as I enabled "remote" in the table this behavior occurs, but not when it is disabled.
Any suggestions?
EDIT: I am using the latest (4.0.0) version of React Bootstrap Table.
The text was updated successfully, but these errors were encountered: