fix: Add back mapping hint when parameter is focused (#4634)

This commit is contained in:
Mutasem Aldmour 2022-11-17 13:57:29 +01:00 committed by GitHub
parent 376a0d000a
commit b35172e442
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -53,7 +53,7 @@
:class="{
[$style.header]: true,
[$style.draggableHeader]: mappingEnabled,
[$style.activeHeader]: i === activeColumn && mappingEnabled,
[$style.activeHeader]: (i === activeColumn || forceShowGrip) && mappingEnabled,
[$style.draggingHeader]: isDragging,
}"
>
@ -202,6 +202,7 @@ export default mixins(externalHooks).extend({
data() {
return {
activeColumn: -1,
forceShowGrip: false,
draggedColumn: false,
draggingPath: null as null | string,
hoveringPath: null as null | string,
@ -234,6 +235,9 @@ export default mixins(externalHooks).extend({
tableData(): ITableData {
return this.convertToTable(this.inputData);
},
focusedMappableInput(): string {
return this.ndvStore.focusedMappableInput;
},
},
methods: {
shorten,
@ -494,6 +498,16 @@ export default mixins(externalHooks).extend({
this.$emit('displayModeChange', 'json');
},
},
watch: {
focusedMappableInput(curr: boolean) {
setTimeout(
() => {
this.forceShowGrip = !!this.focusedMappableInput;
},
curr ? 300 : 150,
);
},
},
});
</script>