diff --git a/src/components/DisclosureWidget.vue b/src/components/DisclosureWidget.vue index 02f013b3e..94d1413be 100644 --- a/src/components/DisclosureWidget.vue +++ b/src/components/DisclosureWidget.vue @@ -237,6 +237,7 @@ const actions = computed(() => { label-visible :aria-invalid="inputErrors.length ? true : undefined" :description-id="inputErrors.length ? 'errors-name' : undefined" + @keypress.prevent.enter="onValidateEdit" />

diff --git a/src/components/bouquets/BouquetDatasetList.vue b/src/components/bouquets/BouquetDatasetList.vue index c02074bc6..a3c0acea6 100644 --- a/src/components/bouquets/BouquetDatasetList.vue +++ b/src/components/bouquets/BouquetDatasetList.vue @@ -6,7 +6,7 @@ import DatasetEditModal, { type DatasetEditModalType } from '@/components/forms/dataset/DatasetEditModal.vue' import config from '@/config' -import { type DatasetProperties, type DatasetsGroups } from '@/model/topic' +import { type DatasetProperties } from '@/model/topic' import { useDatasetStore } from '@/store/DatasetStore' import { fromMarkdown } from '@/utils' import { isAvailable } from '@/utils/bouquet' @@ -14,7 +14,7 @@ import { useTopicsConf } from '@/utils/config' import { toastHttpError } from '@/utils/error' import { isNotFoundError } from '@/utils/http' -import { noGroup, useGroups } from '@/utils/bouquetGroups' +import { useGroups } from '@/utils/bouquetGroups' import DisclosureWidget from '../DisclosureWidget.vue' import BouquetDatasetCard from './BouquetDatasetCard.vue' @@ -49,31 +49,6 @@ const { deleteGroup } = useGroups(datasetsProperties) -const sortedGroupedDatasets = computed(() => { - // get all entries within nogroup if any exists - const noGroupEntries: DatasetProperties[] | null = groupedDatasets.value.has( - noGroup - ) - ? groupedDatasets.value.get(noGroup) - : null - // create a new Map without nogroup - const filteredGroups: DatasetsGroups = new Map( - [...groupedDatasets.value].filter(([key]) => key !== noGroup) - ) - // Alphabetically sort the keys with nogroup at the end - const entries = Array.from(filteredGroups.entries()).sort( - ([keyA], [keyB]) => { - return keyA.toString().localeCompare(keyB.toString()) - } - ) - // Add the nogroup to the end of the sorted array - if (noGroupEntries) { - entries.push([noGroup, noGroupEntries]) - } - // Convert back the sorted groups into a Map - return new Map(entries) -}) - const handleRemoveDataset = (group: string, index: number) => { removeDatasetFromGroup(group, index) emits('updateDatasets') @@ -159,7 +134,7 @@ onMounted(() => {