9 lines
262 B
TypeScript
9 lines
262 B
TypeScript
import { useState } from 'react'
|
|
|
|
import type { QueryListItem } from './query'
|
|
|
|
export const useQueryComboboxState = () => {
|
|
const [value, setValue] = useState<QueryListItem | null>(null)
|
|
return { value, onChange: (item: QueryListItem) => setValue(item) }
|
|
}
|