mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Add form directory input on blur as well as enter; ensure valid though.
This commit is contained in:
@@ -35,7 +35,8 @@
|
||||
trim
|
||||
@keyup.enter="addPath"
|
||||
@keydown.191.capture.prevent.stop="addPath"
|
||||
@keydown.8.capture="removeLastPath" />
|
||||
@keydown.8.capture="removeLastPath"
|
||||
@blur="handleBlur" />
|
||||
</b-breadcrumb-item>
|
||||
</b-breadcrumb>
|
||||
|
||||
@@ -158,6 +159,14 @@ export default {
|
||||
}
|
||||
this.$emit("input", url);
|
||||
},
|
||||
handleBlur() {
|
||||
if (this.currentDirectoryName && this.isValidName) {
|
||||
const newFolder = this.currentDirectoryName;
|
||||
this.pathChunks.push({ pathChunk: newFolder, editable: true });
|
||||
this.currentDirectoryName = "";
|
||||
}
|
||||
this.updateURL();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user