Skip to content

Commit

Permalink
docs: fix type error for autocomplete (element-plus#18762)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkasany authored Nov 5, 2024
1 parent 98c7422 commit 6fa9f78
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/examples/autocomplete/autocomplete-template.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ const querySearch = (queryString: string, cb) => {
// call callback function to return suggestion objects
cb(results)
}
const createFilter = (queryString) => {
return (restaurant) => {
const createFilter = (queryString: string) => {
return (restaurant: LinkItem) => {
return (
restaurant.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0
)
Expand All @@ -55,7 +55,7 @@ const loadAll = () => {
{ value: 'babel', link: 'https://github.com/babel/babel' },
]
}
const handleSelect = (item: LinkItem) => {
const handleSelect = (item: Record<string, any>) => {
console.log(item)
}
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/autocomplete/autocomplete.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const loadAll = () => {
]
}
const handleSelect = (item: RestaurantItem) => {
const handleSelect = (item: Record<string, any>) => {
console.log(item)
}
Expand Down

0 comments on commit 6fa9f78

Please sign in to comment.