File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
@kiva/kv-components/src/vue Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,7 @@ import {
235
235
computed ,
236
236
onMounted ,
237
237
onUnmounted ,
238
+ watch ,
238
239
} from ' vue' ;
239
240
import { throttle } from ' ../utils/throttle' ;
240
241
import KvCartModal from ' ./KvCartModal.vue' ;
@@ -337,6 +338,7 @@ export default {
337
338
],
338
339
setup (props , { emit }) {
339
340
const {
341
+ modalVisible ,
340
342
addedLoan ,
341
343
userData ,
342
344
hasEverLoggedIn ,
@@ -441,7 +443,13 @@ export default {
441
443
}
442
444
};
443
445
444
- const updateHeaderPositionThrottled = throttle (updateHeaderPosition, 100 );
446
+ const updateHeaderPositionThrottled = throttle (updateHeaderPosition, 50 );
447
+
448
+ watch (modalVisible, () => {
449
+ if (modalVisible .value ) {
450
+ updateHeaderPosition ();
451
+ }
452
+ }, { immediate: true });
445
453
446
454
onMounted (() => {
447
455
updateHeaderPosition ();
You can’t perform that action at this time.
0 commit comments