Drawers not always loading data

  • 1
  • Problem
  • Updated 3 years ago
  • Solved
I have drawer in one on my Skuid pages with main table and drawers when the page is loaded drawers shows data when they are opened.

But if the user searches for on the main table and data changes the drawer do not have data when they are opened.

The model that is used in drawer is being queried when the drawer is opened.

Photo of Andrew Ottaru

Andrew Ottaru

  • 1,098 Points 1k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
Is the model used in the drawer the same as the model in the main table that the search is being executed on? You might want to make them separate models. Then the search criteria on the main table model won't effect the conditions in the model in the drawer. I'm just a beginner though, so I might not know what I am talking about.
Photo of Matt Sones

Matt Sones, Champion

  • 31,478 Points 20k badge 2x thumb
Andrew,

Try using the 'before load actions' on the drawer to query the drawer's model, instead of querying every time the drawer is opened. Then each drawer should load only once, when it is first opened.
Photo of Andrew Ottaru

Andrew Ottaru

  • 1,098 Points 1k badge 2x thumb
Thank you Raymond and Matt.

Matt, I am using 'before load action' but I am still not getting proper results. When the table is first loaded when the drawers are open there are rows displayed but if someone searches for different records in the main table the drawers are not loading with data.