I have an LWC integrated into my CRM analytics dashboard that displays data based on a compare table. The LWC is designed to display specific data based on global filter selections made by the user, and the query behind it is being updated accordingly.
The issue is that the LWC doesn't update in real-time when the global filter in the dashboard is changed. Instead, it's always one step behind, i.e., it reflects the previous filter selection.
It's currently being updated using:
@api stateChangedCallback(prevState, newState) {
this.currentState = newState;
this.recalculate();
}
Any insights or suggestions would be greatly appreciated. Thank you!