PricingBlog

Structued data as accordination

  • mix3601-1240749753764155532

    mix3601

    1 year ago

    I am looking for some advice on how to structure data in my front end.

    On page load, ill be fetching records from Xano. I would like to display them in table form where each record is an accordination (like the 'Details - Toggle me' from Shoelace). Furthermore, i would like to be able to select 1 or many, change their status and execute an api call with the selected records.

    Do i create this with repeat divs, in a table or in something else?
  • Tod-1240749755257196546

    Tod

    1 year ago

    Great energy @! Your continuous contribution to the toddle Community just made you advance to Community Level 1!
  • victoruxui-1241026116211179520

    Victor Giron

    1 year ago

    Hi, can you expand more on this please? you mean you want to select multiple records and make a bulk change on all the records?
  • mix3601-1241055724637786225

    mix3601

    1 year ago

    Yes, one or more records.
    Id like to list them like a table with a checkbox and some status labels. However, when you click a record, expands and reveals a text editor.
    Above the table you would have a button that would ‘process’ the record(s).
  • lucasg-1241056012484743229

    Lucas G

    1 year ago

    I think you mean an accordion element
  • lucasg-1241056309160181791

    Lucas G

    1 year ago

    Maybe share an example of what you're looking to build
  • mix3601-1241062282834743297

    mix3601

    1 year ago

    I have not seen this anywhere 🙂
  • But yes, exactly like an accordination element
  • victoruxui-1241071999283892279

    Victor Giron

    1 year ago

    But the main idea is to have a list of items, and perform bulk actions on the a list?
    I think you should look at loops in Xano to update records
  • mix3601-1241072943866580993

    mix3601

    1 year ago

    Alright, I’ll do that. I’m planning to use build ship or something similar for the backed, as I need to perform operations on the selected items 1 by 1 after from a Que (the selected items).
  • victoruxui-1241073845281095731

    Victor Giron

    1 year ago

    Yeah this is definitely something you want to do on the backend, the frontend only sends the variables. If you try to manage this loop on the frontend you most likely have issues
  • mix3601-1241076353407909948

    mix3601

    1 year ago

    But I’ll build the ‘accordion table’ in toddle with regular divs to hold the data?
  • victoruxui-1241077689796792321

    Victor Giron

    1 year ago

    I imagine this just as a table with some expandable content right? Yeah, you build the table with regular divs
  • mix3601-1241089916738211860

    mix3601

    1 year ago

    Alright, thanks for the help