2017-08-25 82 views
1

我試圖做到:動態設置ID在cardConfig卡的DIV爲onload動態設置卡DIV組件在拉力紙板的ID

時,例如: 覆蓋以下組件

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

失敗的嘗試:

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

回答

0

怎麼樣的一個AfterRender事件呢?

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

Thx for your help – SRallyDev