-
Notifications
You must be signed in to change notification settings - Fork 775
Default value not working for select filter in remote mode #1025
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
Comments
I investigated further, and I think the problem is partly cause by the fact that I load the data asynchronously, but the default value is memorized in my localstorage.
I think there is something to do in a |
You are certainly right, maybe we need a Let me know if you have any question or problems. |
Fixed on |
@AllenFang : Hi Allen , I am using remote = true and fetchTotalData . Select Filter is not working for me. <TableHeaderColumn dataField='verifyGuestUiid' filterFormatted dataFormat={ this.enumFormatter } formatExtraData={ qualityType } filter={ { type: 'SelectFilter', options: qualityType } }>UIID |
I have a table with two enum columns, And I added a filter on them (the table is in remote mode).
Here is a piece of my code :
The options object looks like this (zipObj if from the ramda library):
and the
defaultValue
is 'EASY'.I noticed in the code that you use the
defaultValue
attribute on the select tag, but I think it should just bevalue
. (See here : https://github.com/AllenFang/react-bootstrap-table/blob/master/src/filters/Select.js#L63)I tried to change this in my node_modules folder and the right option was selected, but then it had some strange behaviors, the style was the same as when the placeholder is selected, and I couldn't select the placeholder anymore.
Can you help me figure out what's wrong if it's my code, or publish a fix to this problem ? I'm more than happy to do a PR but I don't see the problem besides the
defaultValue
attribute.The text was updated successfully, but these errors were encountered: