diff --git a/adminforth/spa/src/afcl/Select.vue b/adminforth/spa/src/afcl/Select.vue index 7ab2998d6..c247f4c28 100644 --- a/adminforth/spa/src/afcl/Select.vue +++ b/adminforth/spa/src/afcl/Select.vue @@ -34,7 +34,7 @@
{ + if (showDropdown.value && inputEl.value) { + const rect = inputEl.value.getBoundingClientRect(); + const style = { + left: `${rect.left}px`, + top: isTop.value && dropdownHeight.value + ? `${rect.top - dropdownHeight.value - 8}px` + : `${rect.bottom + 8}px`, + width: `${rect.width}px` + }; + + if (dropdownEl.value) { + Object.assign(dropdownEl.value.style, style); + } + } +}; + onMounted(() => { updateFromProps(); @@ -214,7 +231,11 @@ onMounted(() => { }); addClickListener(); - + + // Add scroll listeners if teleportToBody is true + if (props.teleportToBody) { + window.addEventListener('scroll', handleScroll, true); + } }); const filteredItems = computed(() => { @@ -268,6 +289,10 @@ const toogleItem = (item) => { onUnmounted(() => { removeClickListener(); + // Remove scroll listeners if teleportToBody is true + if (props.teleportToBody) { + window.removeEventListener('scroll', handleScroll, true); + } }); const getDropdownPosition = computed(() => { diff --git a/adminforth/spa/src/components/ColumnValueInput.vue b/adminforth/spa/src/components/ColumnValueInput.vue index d327e9797..9996ba4cc 100644 --- a/adminforth/spa/src/components/ColumnValueInput.vue +++ b/adminforth/spa/src/components/ColumnValueInput.vue @@ -18,6 +18,7 @@ ref="input" class="w-full" :options="columnOptions[column.name] || []" + teleportToBody :placeholder = "columnOptions[column.name]?.length ?$t('Select...'): $t('There are no options available')" :modelValue="value" :readonly="column.editReadonly && source === 'edit'" @@ -28,6 +29,7 @@ ref="input" class="w-full" :options="column.enum" + teleportToBody :modelValue="value" :readonly="column.editReadonly && source === 'edit'" @update:modelValue="$emit('update:modelValue', $event)" @@ -37,6 +39,7 @@ ref="input" class="w-full" :options="getBooleanOptions(column)" + teleportToBody :modelValue="value" :readonly="column.editReadonly && source === 'edit'" @update:modelValue="$emit('update:modelValue', $event)" diff --git a/adminforth/spa/src/components/ColumnValueInputWrapper.vue b/adminforth/spa/src/components/ColumnValueInputWrapper.vue new file mode 100644 index 000000000..15f20d0c1 --- /dev/null +++ b/adminforth/spa/src/components/ColumnValueInputWrapper.vue @@ -0,0 +1,75 @@ + + + \ No newline at end of file diff --git a/adminforth/spa/src/components/GroupsTable.vue b/adminforth/spa/src/components/GroupsTable.vue index b3c561a3a..252725bed 100644 --- a/adminforth/spa/src/components/GroupsTable.vue +++ b/adminforth/spa/src/components/GroupsTable.vue @@ -42,50 +42,17 @@ class="px-6 py-4 whitespace-pre-wrap relative block md:table-cell" :class="{'rounded-br-lg': i === group.columns.length - 1}" > - -
{{ columnError(column) }}
{{ column.editingNote[mode] }}
@@ -98,10 +65,10 @@ + \ No newline at end of file diff --git a/plugins/install-plugins.sh b/plugins/install-plugins.sh index 78e0e97b0..b1f6ec6b2 100644 --- a/plugins/install-plugins.sh +++ b/plugins/install-plugins.sh @@ -1,6 +1,7 @@ PLUGINS="adminforth-audit-log adminforth-email-password-reset adminforth-foreign-inline-list \ adminforth-i18n adminforth-import-export adminforth-text-complete adminforth-open-signup \ -adminforth-rich-editor adminforth-two-factors-auth adminforth-upload adminforth-oauth" +adminforth-rich-editor adminforth-two-factors-auth adminforth-upload adminforth-oauth \ +adminforth-list-in-place-edit" # for each plugin for plugin in $PLUGINS; do