You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am encountering issues with the Filter component and its integration with DatatableWrapper. When I attempt to use controlledProps to manage the filter state externally, the component stops working, breaking both the filter and pagination functionality.
When I do not use controlledProps, the filter and pagination work correctly. However, if I open a modal or interact with other states in the application, the filter value resets, losing the active search.
Additionally, I want to highlight that my problem arises specifically when I add a button in each row that opens a Modal( react-bootstrap/Modal). When the modal is opened, the search input in the data table is cleared.
In the previous implementation, the filter and pagination work correctly.
However, when I open a react-bootstrap/Modal or interact with other parts of the application, the active filter value resets, losing the search.
Current Approach (With controlledProps):
When using controlledProps to manage the filter state externally, both the filter and pagination stop working altogether.
From what I could see, when we want to use controlled component, we only need to provide headers and body column to <DatatableWrapper>. Then, all control components needs to have controlledProps. For example:
I believe that should cover all -- I would appreciate it if you could expand on the StackBlitz example above and expand on your example, if you still have problems. I can fix your example from there 😄 Thanks!
I am encountering issues with the Filter component and its integration with DatatableWrapper. When I attempt to use controlledProps to manage the filter state externally, the component stops working, breaking both the filter and pagination functionality.
When I do not use controlledProps, the filter and pagination work correctly. However, if I open a modal or interact with other states in the application, the filter value resets, losing the active search.
Additionally, I want to highlight that my problem arises specifically when I add a button in each row that opens a Modal( react-bootstrap/Modal). When the modal is opened, the search input in the data table is cleared.
Here’s a simplified example of the issue:
Previous Approach (Without controlledProps):
In the previous implementation, the filter and pagination work correctly.
However, when I open a react-bootstrap/Modal or interact with other parts of the application, the active filter value resets, losing the search.
Current Approach (With controlledProps):
When using controlledProps to manage the filter state externally, both the filter and pagination stop working altogether.
It might be that I’m not correctly understanding how to use the library, and perhaps I should implement my filter externally to the datatable.
SO: Windows 10
CODE: (javascript)
"react": "^18.2.0",
"react-bootstrap": "^2.10.6",
"react-bs-datatable": "^3.15.0",
browser: chrome and edge
thanks!
The text was updated successfully, but these errors were encountered: