event for deck card load/render?

Matt SonesMatt Sones πŸ’ŽπŸ’ŽπŸ’Ž
edited June 25, 2020 in Ideas
I'd like to trigger some javascript each time a deck's card loads. Is there an event or trigger I can tap into?
3
3 votes

Under Consideration Β· Last Updated

Comments

  • Matt SonesMatt Sones πŸ’ŽπŸ’ŽπŸ’Ž
    edited August 17, 2017
    bump
  • Matt SonesMatt Sones πŸ’ŽπŸ’ŽπŸ’Ž
    edited August 21, 2017
    ^^
  • Matt SonesMatt Sones πŸ’ŽπŸ’ŽπŸ’Ž
    edited August 22, 2017
    ^^^^

    (this should be an easy one, skuid)
  • Matt SonesMatt Sones πŸ’ŽπŸ’ŽπŸ’Ž
    edited August 24, 2017
    ^^^^^^
  • Matt SonesMatt Sones πŸ’ŽπŸ’ŽπŸ’Ž
    edited June 25, 2020
    image
  • Pat VachonPat Vachon πŸ’ŽπŸ’ŽπŸ’Ž
    edited August 25, 2017
    LOL!
  • edited April 10, 2020
    This bumpy road is most effective.Β 

    The Deck does not publish any events. You could try and set an event to fire at the same time as the deck is loading.
  • Matt SonesMatt Sones πŸ’ŽπŸ’ŽπŸ’Ž
    edited April 9, 2020
    Stephen,

    Thanks. How would I do that?
  • Craig RosenbaumCraig Rosenbaum ✭✭✭✭
    edited June 25, 2020
    I am definitely in need of the ability to run a snippet for each card that is loaded with access to that card's element. A use case right now is trying to set the card background color based on values from that row. No problem in javascript on a table with a field renderer, but I have not figured out a way to do this on a card.Β 

    Latest thought is to throw a dummy field editor and run my renderer there and at the end hide that element. However, that seems hacky at best.
  • Arne-Per HeurbergArne-Per Heurberg ✭✭✭✭
    edited April 6, 2020
    Any development on this? Thanks!!

  • Pat VachonPat Vachon πŸ’ŽπŸ’ŽπŸ’Ž
    edited April 7, 2020
    You can likely use merge syntax somehow to do this. Still need to do this?
  • Arne-Per HeurbergArne-Per Heurberg ✭✭✭✭
    edited April 7, 2020
    I do:)
  • Pat VachonPat Vachon πŸ’ŽπŸ’ŽπŸ’Ž
    edited April 7, 2020
    Lemeno if you can't figure it out. Set a template above the card with HTML content to use merge syntax to set the class based on field values from the row. You may have to create a Salesforce or Skuid formula to set True/False values to use in the merge syntax.

    Then you can use CSS to target the following element and set it's style.
  • Arne-Per HeurbergArne-Per Heurberg ✭✭✭✭
    edited April 7, 2020
    thanks Pat. I will give that a shot!
  • Arne-Per HeurbergArne-Per Heurberg ✭✭✭✭
    edited April 9, 2020
    Matt, did you ever figure that out?
  • Arne-Per HeurbergArne-Per Heurberg ✭✭✭✭
    edited April 10, 2020
    Ditto Matt question. Any recommendations on what event to set up? Thanks!
  • Arne-Per HeurbergArne-Per Heurberg ✭✭✭✭
    edited April 13, 2020
    Hi Pat, do you have an idea on how to add the event to the deck rendering? attaching to .show won't work. Cheers. Hope you are staying well and safe!

  • Pat VachonPat Vachon πŸ’ŽπŸ’ŽπŸ’Ž
    edited April 13, 2020
    Event for the deck, column and/or card?
  • Arne-Per HeurbergArne-Per Heurberg ✭✭✭✭
    edited April 13, 2020
    I think it would be best to target the deck itself (though card might work too). I am using page include in cards and want run script to assign the actual PI. Thanks
  • Arne-Per HeurbergArne-Per Heurberg ✭✭✭✭
    edited April 13, 2020
    maybe card would work better...
  • Pat VachonPat Vachon πŸ’ŽπŸ’ŽπŸ’Ž
    edited April 15, 2020
    The one way to do this is for sure a hack.
    1. Put either your deck and/or card components within a tab component.
    2. Next set a class on the tab components of move-me-then-hide-me.
    3. Create a snippet move-children-to-siblings to move the deck/card elements within the tab to be a sibling.
    4. Create css to set the tab component to display: none
    5. Set your deck/card actions in the tab component along with move-children-to-siblings.
    Not 100% sure this would work, but lemeno.
  • Matt BrownMatt Brown ✭✭✭✭
    edited May 21, 2020
    Hi all,

    We're consideringΒ  adding support for pagination actions and events in the Deck component; Matt Sones, would that solve for your original need, or does it need to be at the card level for it to be useful?

    Thanks,
    Matt
  • Matt SonesMatt Sones πŸ’ŽπŸ’ŽπŸ’Ž
    edited May 18, 2020
    Thanks, Matt. I honestly don't remember what the issue was anymore. ('.')/
  • Arne-Per HeurbergArne-Per Heurberg ✭✭✭✭
    edited May 18, 2020
    Yes, Matt that would be a start. Card level would be ideal as currently the cards re use id's so it is a challenge to dynamically do page includes I the cards. I know that wasn't Matt's original need but it is one of ours. Thanks
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!