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

View File

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