Skip to content
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

switch Symbol without searchSymbols not fetch data #377

Open
keene2 opened this issue May 29, 2024 · 0 comments
Open

switch Symbol without searchSymbols not fetch data #377

keene2 opened this issue May 29, 2024 · 0 comments

Comments

@keene2
Copy link

keene2 commented May 29, 2024

I'm encountering an issue where if I switch symbols through 'setSymbol' in the following order - tokenA -> setSymbol(tokenB) -> setSymbol(tokenA), the getBars method doesn't get called when switching back to tokenA.

Here are the steps to reproduce:

  • Start with a symbol (for instance tokenA).
  • Switch to a different symbol by calling setSymbol(tokenB).
  • Switch back to the original symbol by again calling setSymbol(tokenA).

I observed that when switching back to tokenA, getBars was not triggered.

This behavior is causing an issue because I expect the chart to fetch the latest data for tokenA by calling getBars when it is set as the active symbol through setSymbol.

I am wondering if this is the expected behavior, or if there is a mechanism I need to implement to ensure that getBars gets called to fetch up-to-date data upon switching back to previously viewed symbols.

Please note, in our implementation, we are not utilizing the searchSymbols function to switch symbols, we directly use setSymbol.

@keene2 keene2 changed the title setSymbol without searchSymbols not fetch data switch Symbol without searchSymbols not fetch data May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant