From d69061023eb400c1acf791eac3b53c1dbda28e31 Mon Sep 17 00:00:00 2001 From: Khoo Yong Jun Date: Fri, 9 Jun 2023 16:06:33 +0800 Subject: [PATCH 1/2] some version the ref container is not array, and accessing first item become null causing scroll effect not working --- .../_subs/PickersContainer/_subs/TimePicker.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/VueCtkDateTimePicker/_subs/PickersContainer/_subs/TimePicker.vue b/src/VueCtkDateTimePicker/_subs/PickersContainer/_subs/TimePicker.vue index a31f4412..1f57856b 100644 --- a/src/VueCtkDateTimePicker/_subs/PickersContainer/_subs/TimePicker.vue +++ b/src/VueCtkDateTimePicker/_subs/PickersContainer/_subs/TimePicker.vue @@ -367,7 +367,7 @@ await this.$nextTick() containers.forEach((container) => { - const elem = this.$refs[container][0] + const elem = this.$refs[container][0] || this.$refs[container] if (!elem) return false elem.scrollTop = 0 From 1ac4640328031dfaeca84e09a36009500237c2fa Mon Sep 17 00:00:00 2001 From: Khoo Yong Jun Date: Sat, 10 Jun 2023 01:19:03 +0800 Subject: [PATCH 2/2] add prepare npm run build --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 33a7bcdd..4e1945b6 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "test:unit": "vue-cli-service test:unit", "test:unit:watch": "vue-cli-service test:unit --watch", "ui": "vue ui", + "prepare": "npm run build", "delete-docs-report": "rm ./docs/report.html", "delete-dist-report": "rm ./dist/report.html", "delete:reports": "npm run delete-docs-report && npm run delete-dist-report"