mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Support a default value when undefined in the review panel toggles.
This commit is contained in:
parent
97b47b496a
commit
310a1341a1
1 changed files with 3 additions and 0 deletions
|
@ -6,6 +6,7 @@ define [
|
|||
scope:
|
||||
onToggle: '&'
|
||||
ngModel: '='
|
||||
valWhenUndefined: '=?'
|
||||
disabled: '=?'
|
||||
onDisabledClick: '=?'
|
||||
link: (scope) ->
|
||||
|
@ -18,6 +19,8 @@ define [
|
|||
scope.onDisabledClick()
|
||||
scope.localModel = scope.ngModel
|
||||
scope.$watch "ngModel", (value) ->
|
||||
if scope.valWhenUndefined? and !value?
|
||||
value = scope.valWhenUndefined
|
||||
scope.localModel = value
|
||||
|
||||
template: """
|
||||
|
|
Loading…
Reference in a new issue