mercredi 19 juin 2019

How to update div element attribute value in ember js and tabulator

I am using tabulator api in ember js framework to display dynamic tables. where tab is not moving from 1st column to 3rd column because 2nd column is disabled. To do this I am trying to update the tabindex attribute as "-1"(by defaule all columns it is zero) for the second column. I have used jquery to do this but it didn't work out.

table = new Tabulator("#sample-table", {
            data:self.get('tableData'),
            selectable:true,
            columns:self.get('tableColumnData'),
            keybindings:true,            
            cellEdited:function(cell){                              
                var accnamecol = $("[tabulator-field=ACCNAME]").tabindex=-1;   
}

tabindex attribute need to modify in the below dom

<div class="tabulator-row tabulator-selectable tabulator-row-odd tabulator-selected" role="row" style="padding-left: 0px;">
<div class="tabulator-cell" role="gridcell" tabulator-field="number" tabindex="0" title="" style="width: 282px; text-align: center; height: 32px;">
11111
<div class="tabulator-col-resize-handle"/>
<div class="tabulator-col-resize-handle prev"/>
</div>
<div class="tabulator-cell" role="gridcell" tabulator-field="name" tabindex="0" title="" style="width: 282px; text-align: center; height: 32px;">
abcdefghi
<div class="tabulator-col-resize-handle"/>
<div class="tabulator-col-resize-handle prev"/>
</div>
<div class="tabulator-cell" role="gridcell" tabulator-field="AMOUNT" tabindex="0" title="" style="width: 282px; text-align: center; height: 32px;">
<div class="tabulator-col-resize-handle"/>
<div class="tabulator-col-resize-handle prev"/>
</div>
<div class="tabulator-cell" role="gridcell" tabulator-field="refno" tabindex="0" title="" style="width: 284px; text-align: center; height: 32px;">
<div class="tabulator-col-resize-handle"/>
<div class="tabulator-col-resize-handle prev"/>
</div>
</div>
}); 

enter image description here




Aucun commentaire:

Enregistrer un commentaire