Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
pvintona8
Partner - Contributor II
Partner - Contributor II

Why is setTimeout() required when calling SelectTextsInColumn() ?

Can anybody think why I would need to wait in order for the SelectTextsInColumn() function to work?

For example, this does NOT work:

   _this.Data.SelectTextsInColumn(0, false, 'my selection');

But when I wait 1ms, it works perfectly:

   setTimeout( function() { _this.Data.SelectTextsInColumn(0, false, 'my selection'); },1);

As you can see in this example, all of the arguments for SelectTextsInColumn() are hard-coded, so I don't think my code has to wait for some other asynchronous operation to complete.

Has anybody else seen this behavior?

In case it helps, I am using javascript inside of an extension.

Thanks in advance for your help!

0 Replies