mapcomplete/UI/Input/MultiTagInput.ts

15 lines
405 B
TypeScript
Raw Permalink Normal View History

import {UIEventSource} from "../../Logic/UIEventSource";
import TagInput from "./SingleTagInput";
2020-09-02 11:37:34 +02:00
import {MultiInput} from "./MultiInput";
2020-09-02 11:37:34 +02:00
export class MultiTagInput extends MultiInput<string> {
2020-09-02 11:37:34 +02:00
constructor(value: UIEventSource<string[]> = new UIEventSource<string[]>([])) {
super("Add a new tag",
() => "",
() => new TagInput(),
value
);
}
}