Skip to content

Commit 8cf8ef8

Browse files
authored
🤖 Merge PR DefinitelyTyped#70296 [awesomplete] Add container option by @danielholmes
1 parent b3ce4d3 commit 8cf8ef8

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

types/awesomplete/awesomplete-tests.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,11 @@ new Awesomplete(input, {
9191
});
9292
},
9393
});
94+
95+
new Awesomplete(input, {
96+
container: (element) => {
97+
const container = document.createElement("div");
98+
container.appendChild(element);
99+
return container;
100+
},
101+
});

types/awesomplete/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ declare namespace Awesomplete {
4747
sort?: boolean | SortFunction | undefined;
4848
item?(text: string, input: string, item_id: number): HTMLElement;
4949
replace?(suggestion: string | Suggestion): void;
50+
container?(input: HTMLElement): HTMLElement;
5051
}
5152
}
5253

0 commit comments

Comments
 (0)