You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an override to useTypeAhead behavior from @floating-ui/react allowing use <input /> in DropDown.Header (#1394)
* add an override to useTypeAhead behavior from @floating-ui/react when using input html types in header of DropDown
* fixing up coderabbitai nitpicks since I made additions to this file to help speed future reviews.
* Apply suggestions from code review
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
* format code
* Apply suggestions from code review
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
---------
Co-authored-by: Sutu Sebastian <[email protected]>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Co-authored-by: SutuSebastian <[email protected]>
Copy file name to clipboardExpand all lines: apps/web/content/docs/components/dropdown.mdx
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@ title: React Dropdown - Flowbite
3
3
description: Use the dropdown component to trigger a list of menu items when clicking on an element such as a button or link based on multiple styles, sizes, and placements with React
4
4
---
5
5
6
-
The dropdown component is a UI component built with React that allows you to show a list of items when clicking on a trigger element (ie. a button) that you can use to build dropdown menus, lists, and more.
6
+
The dropdown component is a UI element built with React that displays a list of items when a trigger element (e.g., a button) is clicked. You can use it to build dropdown menus, lists, and more.
7
7
8
-
The default styles are built with the utility classes from Tailwind CSS and you can use the custom props from React to customize the behaviour and positioning of the dropdowns.
8
+
The default styles are built using utility classes from Tailwind CSS. You can customize the behavior and positioning of the dropdowns using custom props from React.
9
9
10
10
To start using the component make sure that you have imported it from Flowbite React:
11
11
@@ -15,7 +15,7 @@ import { Dropdown } from "flowbite-react";
15
15
16
16
## Default dropdown
17
17
18
-
Use this example to create a simple dropdown with a list of menu items by adding child `<Dropdown.Item>` components inside of the main `<Dropdown>` component.
18
+
Use this example to create a simple dropdown with a list of menu items by adding child `<Dropdown.Item>` components inside the main `<Dropdown>` component.
19
19
20
20
<Examplename="dropdown.root" />
21
21
@@ -29,6 +29,8 @@ Use the `<Dropdown.Divider>` component to add a divider between the dropdown ite
29
29
30
30
Use the `<Dropdown.Header>` component to add a header to the dropdown. You can use this to add a user profile image and name, for example.
31
31
32
+
For more complex headers that include an `<input>` or `<TextInput>` control, set `enableTypeAhead` to `false` on the `<Dropdown>` to prevent keystrokes from being interpreted as item searches.
33
+
32
34
<Examplename="dropdown.header" />
33
35
34
36
## Dropdown items with icon
@@ -63,7 +65,7 @@ Add a custom `onClick` event handler to the `<Dropdown.Item>` component to handl
63
65
64
66
## Custom trigger
65
67
66
-
To customize the trigger element you can use `renderTrigger` property.
68
+
To customize the trigger element, you can use the`renderTrigger` property.
0 commit comments