corejavascript / corejavascript/typeahead.js
append to body mode
Open
enhancement
- Dominant language
- JavaScript
- Stars
- 968
- Forks
- 231
- PR merge metrics
- No merged PRs in 30d
Description
If the search field is within an overflow element (like `
`), you can already append the suggestion menu to another DOM element.
```javascript
$('.typeahead').typeahead({
// ...
menu: $('div-on-body')
}, /* dataset */);
```
In order to position the suggestion menu under the search field, you must do the calculations for top, left and width by yourself.
```javascript
$('.typeahead').typeahead({
// ...
menu: $('div-on-body')
}, /* dataset */);
```
In order to position the suggestion menu under the search field, you must do the calculations for top, left and width by yourself.
Wouldn't it be great if there is an "append-to-body" mode that makes these calculations for you?
Contributor guide
Assessment
This issue has not been assessed yet.