Skip to content

Commit

Permalink
Add focusInputFindLabel prop to label-trees component in video labels…
Browse files Browse the repository at this point in the history
… tab

to focus Input
  • Loading branch information
aneust committed Nov 14, 2024
1 parent 8d44236 commit 2b8c5c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions resources/assets/js/videos/videoContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ export default {
swappingLabel: false,
disableJobTracking: false,
supportsJumpByFrame: false,
focusInputFindlabel: false,
};
},
computed: {
Expand Down Expand Up @@ -747,14 +748,13 @@ export default {
this.supportsJumpByFrame = true;
}
// Focus findbar in labelTrees
Events.$on('focusTypeaheadEvent', () => {
this.$nextTick(() => {
Events.$emit('callFunctionFocustypeahead')
this.focusInputFindlabel = true;
});
this.focusInputFindlabel = false;
});
// on control + k openSidebar labels and after focus find
Keyboard.on('control+k', () => {
this.openSidebarLabels()
});
Expand Down
2 changes: 1 addition & 1 deletion resources/views/videos/show/sidebar-labels.blade.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<sidebar-tab name="labels" icon="tags" title="Label trees">
<div class="labels-tab">
<div class="labels-tab__trees">
<label-trees :trees="labelTrees" :show-favourites="true" v-on:select="handleSelectedLabel" v-on:deselect="handleDeselectedLabel" v-on:clear="handleDeselectedLabel"></label-trees>
<label-trees :trees="labelTrees" :focus-input="focusInputFindlabel" :show-favourites="true" v-on:select="handleSelectedLabel" v-on:deselect="handleDeselectedLabel" v-on:clear="handleDeselectedLabel"></label-trees>
</div>
</div>
</sidebar-tab>

0 comments on commit 2b8c5c4

Please sign in to comment.