${this.value && this.value.length > 0
? html`
${this.value.map((arrayItem, index) => {
return html`
{
this.handleDeleteItemClick(index);
}}
>
`;
})}
`
: undefined}
this.handleInputChange(e)}
@keydown=${(e: KeyboardEvent) => {
if (e.key === "Enter") {
this.handleAddItemClick();
}
}}
value=${this._inputValue}
>
{
this.handleAddItemClick();
}}
>
Add
`;
}
}
// add types
declare global {
interface HTMLElementTagNameMap {
"default-array-input": DefaultArrayInput;
}
}