mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-27 02:52:48 +00:00
fix: ensure filterList is properly initialized and updated in getList function
This commit is contained in:
parent
b2ad983154
commit
c4fd921377
|
|
@ -161,6 +161,7 @@ function open(id: string) {
|
|||
}
|
||||
|
||||
async function getList() {
|
||||
filterList.value = null
|
||||
if (toolType.value === 'DATA_SOURCE') {
|
||||
categories.value = [
|
||||
{
|
||||
|
|
@ -194,7 +195,7 @@ async function getInternalToolList() {
|
|||
const categories = defaultCategories.value
|
||||
const res = await ToolStoreApi.getInternalToolList({ name: searchValue.value }, loading)
|
||||
if (searchValue.value.length) {
|
||||
filterList.value = res.data
|
||||
filterList.value = [...res.data, ...filterList.value || []]
|
||||
} else {
|
||||
filterList.value = null
|
||||
categories.forEach((category) => {
|
||||
|
|
@ -223,7 +224,7 @@ async function getStoreToolList() {
|
|||
tool.desc = tool.description
|
||||
})
|
||||
if (searchValue.value.length) {
|
||||
filterList.value = res.data.apps
|
||||
filterList.value = [...res.data.apps, ...filterList.value || []]
|
||||
} else {
|
||||
filterList.value = null
|
||||
categories = tags.map((tag: any) => ({
|
||||
|
|
|
|||
Loading…
Reference in New Issue