Make table default to toggled off

  • 1
  • Question
  • Updated 8 months ago
  • Answered
Hello All,

I have a table and a toggle button that shows/hides the table. Perfect, but I would like for the page to load with the table default to toggled off (hidden). Is there a way to accomplish this?
Photo of Michael Schniepp

Michael Schniepp

  • 1,808 Points 1k badge 2x thumb
  • hopeful

Posted 8 months ago

  • 1
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
You can create a UI only field that is blank or “hide” by default, then have a button that sets it to “show”. Then render the table based on that UI only field.
Photo of Michael Schniepp

Michael Schniepp

  • 1,808 Points 1k badge 2x thumb
Thanks I think this is the best approach for me. 
Photo of Bill McCullough

Bill McCullough, Champion

  • 12,436 Points 10k badge 2x thumb
Michael,

If you are using Skuid 11, you can setup an Action Sequence.  Set it up as 'Event-triggered sequence' and set Event Name as 'Skuid Page: Rendered'.  Then add an action to Toggle your table and Hide it.  You can also do other actions when the page is rendered.

Thanks,

Bill
Photo of Michael Schniepp

Michael Schniepp

  • 1,808 Points 1k badge 2x thumb
Thanks Bill, We are not using skuid 11 yet. 
Photo of Michael Schniepp

Michael Schniepp

  • 1,808 Points 1k badge 2x thumb
I found a not-so-elegant solution that still seems to work fine for me:
The table only renders for me on page load (using running user attribute conditions based on my name) and not for our users. But when users click the toggle button the table will appear. This has been successful in my testing.
(Edited)
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
Just a thought:
I use a pick list UI only field and set it’s value to render or hide a variety of elements on the page by setting the picklist value with a button. You can create your own “tab sets” with this functionality giving you more flexibility. You can also use it to build a contextual set of components depending on the activity a person wants to do or see.