Skip to content

Commit c5bfa8e

Browse files
ingmothmanmrchief
authored andcommitted
feat: render the search input inside the dropdown (#309)
1 parent f90e9f8 commit c5bfa8e

17 files changed

+551
-260
lines changed

README.md

+19-8
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ A lightweight and fast control to render a select component that can display hie
2929
## Table of Contents
3030

3131
- [Screenshot](#screenshot)
32-
- [Demo](#example)
33-
- [Vanilla (no framework)](#vanilla-no-framework)
32+
- [Demo](#demo)
33+
- [Vanilla, no framework](#vanilla-no-framework)
3434
- [With Bootstrap](#with-bootstrap)
3535
- [With Material Design](#with-material-design)
3636
- [As Single Select](#as-single-select)
@@ -44,36 +44,41 @@ A lightweight and fast control to render a select component that can display hie
4444
- [clearSearchOnChange](#clearsearchonchange)
4545
- [onChange](#onchange)
4646
- [onNodeToggle](#onnodetoggle)
47+
- [onAction](#onaction)
48+
- [onFocus](#onfocus)
49+
- [onBlur](#onblur)
4750
- [data](#data)
4851
- [texts](#texts)
4952
- [keepTreeOnSearch](#keeptreeonsearch)
5053
- [keepChildrenOnSearch](#keepchildrenonsearch)
5154
- [keepOpenOnSelect](#keepopenonselect)
5255
- [mode](#mode)
53-
- [multiSelect](#multiSelect)
56+
- [multiSelect](#multiselect)
5457
- [hierarchical](#hierarchical)
55-
- [simpleSelect](#simpleSelect)
56-
- [radioSelect](#radioSelect)
58+
- [simpleSelect](#simpleselect)
59+
- [radioSelect](#radioselect)
5760
- [showPartiallySelected](#showpartiallyselected)
58-
- [showDropdown](#showDropdown)
61+
- [showDropdown](#showdropdown)
5962
- [initial](#initial)
6063
- [always](#always)
61-
- [form states (disabled|readOnly)](#formstates)
64+
- [form states (disabled|readOnly)](#form-states-disabled-readonly)
6265
- [id](#id)
6366
- [searchPredicate](#searchpredicate)
67+
- [inlineSearchInput](#inlinesearchinput)
6468
- [Styling and Customization](#styling-and-customization)
6569
- [Using default styles](#default-styles)
6670
- [Customizing with Bootstrap, Material Design styles](#customizing-styles)
71+
- [Keyboard navigation](#keyboard-navigation)
6772
- [Performance](#performance)
6873
- [Search optimizations](#search-optimizations)
6974
- [Search debouncing](#search-debouncing)
7075
- [Virtualized rendering](#virtualized-rendering)
7176
- [Reducing costly DOM manipulations](#reducing-costly-dom-manipulations)
72-
- [Keyboard navigation](#keyboard-navigation)
7377
- [FAQ](#faq)
7478
- [Doing more with HOCs](/docs/HOC.md)
7579
- [Development](#development)
7680
- [License](#license)
81+
- [Contributors](#contributors)
7782

7883
## Screenshot
7984

@@ -401,6 +406,12 @@ function searchPredicate(node, searchTerm) {
401406
return <DropdownTreeSelect data={data} searchPredicate={searchPredicate} />
402407
```
403408

409+
### inlineSearchInput
410+
411+
Type: `bool` (default: `false`)
412+
413+
`inlineSearchInput=true` makes the search input renders **inside** the dropdown-content. This can be useful when your UX looks something like [this comment](https://github.com/dowjones/react-dropdown-tree-select/issues/308#issue-526467109).
414+
404415
## Styling and Customization
405416

406417
### Default styles

0 commit comments

Comments
 (0)