webuipopoveruser Ответов: 0

Ограничьте показ webuipopover только после завершения вызова БД


Hi
   I am new to webuipopover. On a button click, I need to show dynamic content in a webuipopover, based on the selected value of a combo box. My issue is - on the first click, a blank popover is shown. It is displaying contents only from the 2nd click.
Wanted to show the popover only after db call for data fetch is completed.
I am doing the data fetch in content function.
Please help me how to resolve this.

eg:
 $(#button).webuiPopover({
        placement: 'top',
        trigger: 'click',
        cache: false,
        type:'async',
        content: function(){
           populateContents();//db call
           return $('.popoverPlaceholder').html();
        }
        
      });
    })

What I have tried:

<pre> $(#button).webuiPopover({
        placement: 'top',
        trigger: 'click',
        cache: false,
        type:'async',
        content: function(){
           populateContents();//db call
           return $('.popoverPlaceholder').html();
        }
        
      });
    })

0 Ответов