APIs & Integrations

Ran-ST
Colaborador(a)

Scheduling Widget API / hide and show progrmatically

I am embedding the scheduling widget in a react next app. I want to display it after the user has clicked a button, so I render the script and the div conditionally and it works just fine.

 

However, when I get navigate to another page back to that page again and click the button the widget won't show. It will appear again only after refreshing the page (and clicking the button once more).

If I include the script in the head of the page before rendering the div it won't show either.

 

How can I show/hide it programmatically? Is there any API for this widget, similar to the conversations widget?

0 Avaliação positiva
4 Respostas 4
ChehakWadhdwa
Membro | Parceiro Diamante
Membro | Parceiro Diamante

Scheduling Widget API / hide and show progrmatically

Hi Ran-ST

Considering that you are showing and hiding the div using the Jquery So instead of hide and show you just toggle the display property of that div as we can retain the last state of the div after user press back button from the next age.

 

Hope this helps! If we were able to answer your query, kindly help the community by marking it as a solution. Thanks and Regards.

0 Avaliação positiva
Ran-ST
Colaborador(a)

Scheduling Widget API / hide and show progrmatically

Thanks for the quick reply!

Unfortunately, this solution didn't help. If I use display none/block the widget will be shown only once. If I use visibility hidden/visible the widget will be shown only once, and while the widget element is not visible its container still takes place (as this CSS property should work).

0 Avaliação positiva
ChehakWadhdwa
Membro | Parceiro Diamante
Membro | Parceiro Diamante

Scheduling Widget API / hide and show progrmatically

Ran-ST Have you tried to set it to revert or inherit instead of the block as in most of the cases this doesn't happen. 

0 Avaliação positiva
Ran-ST
Colaborador(a)

Scheduling Widget API / hide and show progrmatically

I actually have another parent div and then I show the widget, so those style are applied to it. Not sure if I understood you correctly

0 Avaliação positiva