Skip to content

Commit

Permalink
Update wrapper classnames
Browse files Browse the repository at this point in the history
  • Loading branch information
niketpathak committed Oct 26, 2020
1 parent a32b7f1 commit 0e12c1e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ typeahead({
Some basic styling is added to typeahead by default. However the UI is completely upto you and is customizable to the very pixel. You can override styling using the following classes.

- The input is wrapped in a container with a class `typeahead-standalone-input`. It contains the original input element that gets an additional class `tt-input`)
- The container of the list of suggestions has a class `typeahead-standalone`. A custom class may be used in addition. (See config option `className`)
- The list of suggestions is wrapped in a container with a class `typeahead-standalone-list`. A custom class may be used in addition. (See config option `className`)
- Each suggestion has a `tt-suggestion` class
- Each selected suggestion has a `tt-selected` class
- Each group has a `tt-group` class
Expand Down
2 changes: 1 addition & 1 deletion src/style.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.typeahead-standalone {
.typeahead-standalone-list {
background: #fff;
z-index: 1000;
box-sizing: border-box;
Expand Down
2 changes: 1 addition & 1 deletion src/typeahead-standalone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default function typeahead<T extends typeaheadItem>(config: typeaheadConf
const inputHint: HTMLInputElement = input.cloneNode() as HTMLInputElement;
injectHintEl(inputHint);

container.className = 'typeahead-standalone ' + (config.className || '');
container.className = 'typeahead-standalone-list ' + (config.className || '');

// IOS implementation for fixed positioning has many bugs, so we will use absolute positioning
containerStyle.position = 'absolute';
Expand Down

0 comments on commit 0e12c1e

Please sign in to comment.