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

async data after click on the popup item (async selectTemplate) #599

Open
CavalcanteLeo opened this issue Feb 2, 2021 · 1 comment
Open

Comments

@CavalcanteLeo
Copy link

CavalcanteLeo commented Feb 2, 2021

This is not a bug, just a question.

I have about 100 shortcuts that is load with the page.
I will set those shortcuts as values in tributes.
Something like:

values: [
    { shortcut: "mri", id: 1, title: "mri 1" },
    { shortcut: "mri", id: 2, title: "mri 2" },
    { shortcut: "mri", id: 3, title: "mri 3" },
    { shortcut: "mri", id: 4, title: "mri 4" },
    // and hundreds more
],

When the user select the one he needs, i need to fetch async the API using the ID provided. That is because the response is a huge text each ID response can hit up to 2mb of text

So, tribute will fetch that and set on my text editor the response of that fetch.

How can I do that?

I tried selectTemplate but it didn't accept async data

PS: i cannot load all values with all text i need because it will be about 1gb of text
I also need to load the values with the shortcut and ID instantly, the fetch will be only after I select one item

@CavalcanteLeo
Copy link
Author

@CavalcanteLeo CavalcanteLeo changed the title async data after click on the popup item async data after click on the popup item (async selectTemplate) Feb 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant