Skip to content

Commit

Permalink
MappingBrowser go to page: Select and focus input when shown (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
stefandesu committed Sep 27, 2022
1 parent e206a3a commit fe909b8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/MappingBrowserTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@
:target="`mappingBrowser-pagination-goToPage-${section.id}`"
triggers="click"
placement="bottomleft"
@shown="goToPagePopoverShown"
@hide="popoverHide($event, `goToPage-${section.id}`)">
<div>
<p>
Expand Down Expand Up @@ -764,6 +765,13 @@ export default {
this.$emit("pageChange", { registry: section.registry, page: this.goToPageValues[section.id], userInitiated: true })
this.$set(this.popoverShown, `goToPage-${section.id}`, false)
},
goToPagePopoverShown(event) {
const inputField = event.relatedTarget && event.relatedTarget.getElementsByTagName("input")[0]
if (inputField) {
inputField.focus()
inputField.select()
}
},
},
}
</script>
Expand Down

0 comments on commit fe909b8

Please sign in to comment.