hi again dear webix team! hope you’re doing great an getting ready for holidays!
i need to add counter to my datatable but idk how to create it. i want the counter to use “-“ and “+” buttons but not change when you edit number.
please help
Hi, @ratchell !
For such purpose you can use HTML counter (do not forget to add readonly to disable editing):
myCounter:function(obj, common, value, column, index){
var html = "<div class='webix_el_group' style='width:80px; height:32px;'>";
html += "<button type='button' class='webix_inp_counter_prev' tabindex='-1' >-</button>";
html += "<input type='text' readonly class='webix_inp_counter_value' style='height:28px;' value='"+value+"'></input>";
html += "<button type='button' class='webix_inp_counter_next' tabindex='-1'>+</button></div>";
return html;
}
Please, check the following snippet: Code Snippet
1 Like
ahhh as fast as always!! tnx, that’s exactly what i was looking for.
merry christmas and happy new year