mirror of
https://github.com/iib0011/omni-tools.git
synced 2025-11-15 20:38:33 +05:30
Add groupings for the search bar
This commit is contained in:
parent
68ad334a7f
commit
ec360478cc
1 changed files with 2 additions and 3 deletions
|
|
@ -26,9 +26,7 @@ const exampleTools: { label: string; url: string }[] = [
|
||||||
export default function Hero() {
|
export default function Hero() {
|
||||||
const [inputValue, setInputValue] = useState<string>('');
|
const [inputValue, setInputValue] = useState<string>('');
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
const [filteredTools, setFilteredTools] = useState<DefinedTool[]>(
|
const [filteredTools, setFilteredTools] = useState<DefinedTool[]>(tools);
|
||||||
_.shuffle(tools)
|
|
||||||
);
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const handleInputChange = (
|
const handleInputChange = (
|
||||||
event: React.ChangeEvent<{}>,
|
event: React.ChangeEvent<{}>,
|
||||||
|
|
@ -66,6 +64,7 @@ export default function Hero() {
|
||||||
sx={{ mb: 2 }}
|
sx={{ mb: 2 }}
|
||||||
autoHighlight
|
autoHighlight
|
||||||
options={filteredTools}
|
options={filteredTools}
|
||||||
|
groupBy={(option) => option.type}
|
||||||
inputValue={inputValue}
|
inputValue={inputValue}
|
||||||
getOptionLabel={(option) => option.name}
|
getOptionLabel={(option) => option.name}
|
||||||
renderInput={(params) => (
|
renderInput={(params) => (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue