Visual error when selecting line in the Datatable with “select: line” and validation error
function positiveNumber(value){ return value > 0; }
var small_wrong_film_set = [
{ id:1, title:"The Shawshank Redemption", year:1994, votes:-678790, rating:0, rank:1, category:"Thriller"},
{ id:2, title:"The Godfather", year:"", votes:-511495, rating:9.2, rank:-2, category:"Crime"},
{ id:3, title:"The Godfather: Part II", year:1974, votes:-319352, rating:0, rank:3, category:"Crime"},
{ id:4, title:"The Good, the Bad and the Ugly", year:1966, votes:-213030, rating:8.9, rank:4, category:"Western"},
{ id:5, title:"Pulp fiction", year:1994, votes:-533848, rating:8.9, rank:5, category:"Crime"},
{ id:6, title:"", year:1957, votes:-64558, rating:8.9, rank:6, category:"Western"}
];
webix.ready(function(){
grid = webix.ui({
container:"testA",
view:"datatable",
columns:[
{ id:"rank", header:"", css:"rank", width:50, editor:"text"},
{ id:"title", header:"Film title", width:200, editor:"text"},
{ id:"year", header:"Released" , width:80, editor:"text"},
{ id:"votes", header:"Votes", width:100, editor:"text"}
],
rules:{
"rank":positiveNumber,
"votes":positiveNumber
},
editable:true,
autoheight:true,
autowidth:true,
data:small_wrong_film_set,
ready:function(){
this.validate();
},
select: "row",
editaction: "dblclick"
});
});