Skip to content

Commit 976413d

Browse files
committed
Add a new .lazy modifier to mimic behavior of v1
1 parent 0307e25 commit 976413d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ export var focus = {
1414
},
1515

1616
componentUpdated: function(el, binding) {
17+
if (binding.modifiers.lazy) {
18+
if (Boolean(binding.value) === Boolean(binding.oldValue)) {
19+
return;
20+
}
21+
}
22+
1723
if (binding.value) el.focus();
1824
else el.blur();
1925
},

0 commit comments

Comments
 (0)