-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
The data-is-dirrty value of Field select2 multiple is always true.
The solution I found to resolve
`
checkValues: function(){
var d = this;
this.form.find("input, select, textarea").each( function(){
var initialValue = $(this).attr("data-dirrty-initial-value");
if($(this).val() != initialValue){
$(this).attr("data-is-dirrty", "true");
}else{
$(this).attr("data-is-dirrty", "false");
}
});
this.form.find("input[type=checkbox], input[type=radio]").each( function(){
var initialValue = $(this).attr("data-dirrty-initial-value");
if($(this).is(":checked") && initialValue != "checked"
|| !$(this).is(":checked") && initialValue == "checked"){
$(this).attr("data-is-dirrty", "true");
}else{
$(this).attr("data-is-dirrty", "false");
}
});
this.form.find("input[type=search]").each( function(){
$(this).attr("data-is-dirrty", "false");
});
var isDirty = false;
this.form.find("input, select, textarea").each( function(){
if( $(this).attr("data-is-dirrty") == "true" ){
isDirty = true;
}
});
if(isDirty){
d.setDirty();
}else{
d.setClean();
}
d.fireEvents();
},`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels