mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-05 17:14:20 +01:00
N°1487 Search: Removing an empty criterion doesn't refresh the results anymore
This commit is contained in:
@@ -253,7 +253,9 @@ $(function()
|
||||
_remove: function()
|
||||
{
|
||||
this.element.remove();
|
||||
this.handler.triggerHandler('itop.search.criteria.removed');
|
||||
|
||||
var bHadValues = (Array.isArray(this.options.values) && (this.options.values.length > 0));
|
||||
this.handler.triggerHandler('itop.search.criteria.removed', {had_values: bHadValues});
|
||||
},
|
||||
// - Mark / Unmark criteria as draft (new value not applied)
|
||||
_markAsDraft: function()
|
||||
|
||||
@@ -909,7 +909,7 @@ $(function()
|
||||
_onCriteriaRemoved: function(oData)
|
||||
{
|
||||
this._updateSearch();
|
||||
if(this.options.auto_submit === true)
|
||||
if( (this.options.auto_submit === true) && (oData.had_values === true) )
|
||||
{
|
||||
this._submit();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user