aboutsummaryrefslogtreecommitdiff
path: root/src-vue
diff options
context:
space:
mode:
authorRémy Raes <contact@remyraes.com>2023-04-30 23:02:14 +0200
committerGitHub <noreply@github.com>2023-04-30 23:02:14 +0200
commit06754cc2f63468a6a1945357918428fd9707cd91 (patch)
tree60dd9d576a35c9dd4cbd3b8778c9f414ad80aec8 /src-vue
parentc60440fb59e71dc79a69bfa83610f6712afdb1c5 (diff)
downloadFlightCore-06754cc2f63468a6a1945357918428fd9707cd91.tar.gz
FlightCore-06754cc2f63468a6a1945357918428fd9707cd91.zip
fix: Prevent space character from opening/closing PR collapse items (#300)
fix: prevent space character from opening/closing PR collapse items
Diffstat (limited to 'src-vue')
-rw-r--r--src-vue/src/components/PullRequestsSelector.vue12
1 files changed, 10 insertions, 2 deletions
diff --git a/src-vue/src/components/PullRequestsSelector.vue b/src-vue/src/components/PullRequestsSelector.vue
index ba95624a..585b3e6a 100644
--- a/src-vue/src/components/PullRequestsSelector.vue
+++ b/src-vue/src/components/PullRequestsSelector.vue
@@ -1,7 +1,7 @@
<template>
<div>
<el-collapse @change="onChange">
- <el-collapse-item name="1">
+ <el-collapse-item name="1" @keydown.space="launcherSearchSpace">
<template #title>
Launcher PRs
<el-input class="pr_search_input" v-model="launcherSearch" placeholder="Filter pull requests" @click.stop="() => false"></el-input>
@@ -34,7 +34,7 @@
</div>
</el-collapse-item>
- <el-collapse-item name="2">
+ <el-collapse-item name="2" @keydown.space="modsSearchSpace">
<template #title>
Mods PRs
<el-input class="pr_search_input" v-model="modsSearch" placeholder="Filter pull requests" @click.stop="() => false"></el-input>
@@ -128,6 +128,14 @@ export default defineComponent({
this.getPullRequests('Mods');
}
},
+ launcherSearchSpace(e: KeyboardEvent) {
+ e.preventDefault();
+ this.launcherSearch += ' ';
+ },
+ modsSearchSpace(e: KeyboardEvent) {
+ e.preventDefault();
+ this.modsSearch += ' ';
+ },
async getPullRequests(pull_request_type: PullRequestType) {
this.$store.commit('getPullRequests', pull_request_type);
},