Skip to content

AutoComplete照着官方的例子,为什么VSCODE会报错? #16317

Closed Answered by WestFarmer
WestFarmer asked this question in Q&A
Discussion options

You must be logged in to vote
const query = async (queryString: string, cb: AutocompleteFetchSuggestionsCallback): Promise<AutocompleteData> => {
  if (!queryString) {
    //cb([])
    return []
  }
  const res = await getEntities(props.url, {
    filter: {
      logic: FilterLogic.OR,
      filters: props.treeProps.search.map((s: any) => ({
        type: SEATypes.String,
        operator: Operators.CONTAINS,
        field: s,
        value: queryString,
      })),
    },
  })
  //cb(res.data!)
  return res.data!
}

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@WestFarmer
Comment options

@WestFarmer
Comment options

@Aseisman
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by WestFarmer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants