Dynamically set ID of the Card DIV Component in Rally CardBoard

20 views Asked by At

What I’m trying to accomplish: dynamically set id to the card's div in cardConfig when onload

For example: Overwrite the id of following component

<div class="x-component iterationtrackingboard-card rui-card portfolioitem card-134459361996 editable x-component-default x-border-box drag-handle" id="rallycard-1157">

Failed attempt:

cardConfig: {
    editable: true,
    showIconMenus: true,
    listeners: {
        load: function() {
            // Set ID…
        }
    }
},
1

There are 1 answers

1
Kyle Morse On BEST ANSWER

How about the afterrender event instead?

{
    listeners: {
        afterrender: function(card) {
            var record = card.getRecord(),
                el = card.getEl();
                //set id here
        }
    }
}