[Backport] fix issue #4675

stable
Juanfran 2016-10-21 08:36:28 +02:00
parent dcb9b8ea28
commit d9bab23375
2 changed files with 8 additions and 2 deletions

View File

@ -19,6 +19,12 @@
FilterDirective = () ->
link = (scope, el, attrs, ctrl) ->
unwatch = scope.$watch "vm.defaultQ", (q) ->
if q && !scope.vm.filtersForm.$dirty
scope.vm.q = q
unwatch()
else if scope.vm.filtersForm.$dirty
unwatch()
return {
scope: {
@ -29,7 +35,7 @@ FilterDirective = () ->
onRemoveCustomFilter: "&",
onSaveCustomFilter: "&",
customFilters: "<",
q: "<",
defaultQ: "=q",
filters: "<"
customFilters: "<"
selectedFilters: "<"

View File

@ -1,7 +1,7 @@
h1
span.title(translate="COMMON.FILTERS.TITLE")
form
form(name="vm.filtersForm")
fieldset
input.e2e-filter-q(
type="text",