How do I prevent a Slate query from running automatically when the Slate document loads?

197 Views Asked by At

I have a query and I only want it to run when I click on a button, but not before.

How do I control this?

1

There are 1 best solutions below

0
On

You can set queries to run manually from the query editor.

Press the button next to Run with the down arrow to get the query options, and check the box next to "Run Manually".

Note: If you set a query to run manually, it will not run on document load or when its dependencies change. It will only run when you tell it to (triggered by event, another query, custom javascript, etc..).