Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangshenghang committed Jan 5, 2025
1 parent 5044e85 commit 03717b8
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ import type { NodeType } from './types'

import { debounce } from 'lodash'

interface TableOption {
label: string | string
value: string | string
}

const ConfigurationForm = defineComponent({
name: 'ConfigurationForm',
props: {
Expand Down Expand Up @@ -90,7 +95,7 @@ const ConfigurationForm = defineComponent({

// If there are no results after searching, add user input as a custom value to the options
if (state.tableOptions.length === 0) {
state.tableOptions.push({
(state.tableOptions as TableOption[]).push({
label: tableName,
value: tableName
})
Expand All @@ -100,7 +105,7 @@ const ConfigurationForm = defineComponent({
}
} catch (err) {
// If the interface call fails, also use user input as a custom value
state.tableOptions.push({
(state.tableOptions as TableOption[]).push({
label: tableName,
value: tableName
})
Expand Down

0 comments on commit 03717b8

Please sign in to comment.