Miscellaneous fixes and improvements (#9699)

* fix: base icon color in breadcrumb

* fix: allow expanding nested record from expanded form

* fix: focus base lable in tree view on create/delete/load

* fix: avoid allowing deletion of display value

* fix: focus input field if activeElement is div

* fix: text area height issue

* refactor: show app version on hovering nocodb icon

* refactor: focus only if adding new record

* refactor: extract foreign key value for external source
This commit is contained in:
Pranav C
2024-10-25 12:04:34 +05:30
committed by GitHub
parent 3e0fc8623e
commit ea6ce8d27b
11 changed files with 84 additions and 42 deletions

View File

@@ -493,11 +493,25 @@ async function openAudit(source: SourceType) {
close(1000)
}
}
const labelEl = ref()
watch(
() => labelEl.value && activeProjectId.value === base.value?.id,
async (isActive) => {
if (!isActive) return
await nextTick()
labelEl.value?.scrollIntoView({ behavior: 'smooth' })
},
{
immediate: true,
},
)
</script>
<template>
<NcDropdown :trigger="['contextmenu']" overlay-class-name="nc-dropdown-tree-view-context-menu">
<div
ref="labelEl"
class="mx-1 nc-base-sub-menu rounded-md"
:class="{ active: base.isExpanded }"
:data-testid="`nc-sidebar-base-${base.title}`"
@@ -510,6 +524,7 @@ async function openAudit(source: SourceType) {
'bg-primary-selected active': activeProjectId === base.id && baseViewOpen && !isMobileMode,
'hover:bg-gray-200': !(activeProjectId === base.id && baseViewOpen),
}"
:data-id="base.id"
:data-testid="`nc-sidebar-base-title-${base.title}`"
class="nc-sidebar-node base-title-node h-7 flex-grow rounded-md group flex items-center w-full pr-1 pl-1.5"
>