You can pass in an init=empty keyword argument to lift / consume, and the
initial value of the signal will be an empty UI. The actual value will be
computed next time the input signal udpates. You should also provide a
typ=Any kwarg to lift / consume so that if you replace empty with something
that is not Empty, you do not get a type conversion error. something like:
selected_tab = Input(1)
vbox(
tabs(["a", "b"]) >>> selected_tab,
lift(selected_tab, typ=Any, init=empty) do page_no
// compute page at page_no
end
)
may be what you need. To avoid recomputing when you switch to tab 1 and
then to tab 2 and then back to tab 1, you will need to memoize the function
you pass to lift...
On Wed, Oct 14, 2015 at 6:06 PM, Yakir Gagnon <[email protected]> wrote:
> Title...
> I have a bunch of tabs and it all takes time to load. I don't need the
> functions to evaluate before the user presses on something. Any easy way i
> can prevent all the signals from running their functions when the pages
> load up?