mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Remove dead code from TagAutocomplete
This commit is contained in:
parent
22d5671594
commit
c5b10c1117
1 changed files with 0 additions and 9 deletions
|
@ -3,25 +3,16 @@ Copyright: Ankitects Pty Ltd and contributors
|
||||||
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
-->
|
-->
|
||||||
<script lang="typescript">
|
<script lang="typescript">
|
||||||
import { createEventDispatcher } from "svelte";
|
|
||||||
|
|
||||||
import DropdownMenu from "components/DropdownMenu.svelte";
|
import DropdownMenu from "components/DropdownMenu.svelte";
|
||||||
import DropdownItem from "components/DropdownItem.svelte";
|
import DropdownItem from "components/DropdownItem.svelte";
|
||||||
|
|
||||||
export const suggestions = ["en::idioms", "anki::functionality", "math"];
|
export const suggestions = ["en::idioms", "anki::functionality", "math"];
|
||||||
|
|
||||||
const dispatch = createEventDispatcher();
|
|
||||||
const triggerId = "tagLabel" + String(Math.random()).slice(2);
|
const triggerId = "tagLabel" + String(Math.random()).slice(2);
|
||||||
const triggerClass = "dropdown-toggle";
|
const triggerClass = "dropdown-toggle";
|
||||||
|
|
||||||
let menu: HTMLDivElement;
|
let menu: HTMLDivElement;
|
||||||
|
|
||||||
function onItemClick(event: Event) {
|
|
||||||
dispatch("nameChosen", { name: event.currentTarget!.innerText });
|
|
||||||
event.stopPropagation();
|
|
||||||
event.preventDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
function switchUpDown(event: KeyboardEvent): void {
|
function switchUpDown(event: KeyboardEvent): void {
|
||||||
const target = event.currentTarget as HTMLButtonElement;
|
const target = event.currentTarget as HTMLButtonElement;
|
||||||
if (event.code === "ArrowUp") {
|
if (event.code === "ArrowUp") {
|
||||||
|
|
Loading…
Reference in a new issue