mirror of
https://github.com/seanmorley15/AdventureLog.git
synced 2025-07-27 00:39:37 +02:00
activity type overhaul
This commit is contained in:
parent
f03c338935
commit
f38062e250
6 changed files with 76 additions and 7 deletions
|
@ -20,8 +20,9 @@
|
|||
|
||||
function addActivity() {
|
||||
if (inputVal && activities) {
|
||||
if (!activities.includes(inputVal) && allActivities.includes(inputVal)) {
|
||||
activities = [...activities, inputVal];
|
||||
const trimmedInput = inputVal.trim();
|
||||
if (trimmedInput && !activities.includes(trimmedInput)) {
|
||||
activities = [...activities, trimmedInput];
|
||||
inputVal = '';
|
||||
}
|
||||
}
|
||||
|
@ -56,6 +57,7 @@
|
|||
/>
|
||||
{#if inputVal && filteredItems.length > 0}
|
||||
<ul class="absolute z-10 w-full bg-base-100 shadow-lg max-h-60 overflow-auto">
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
{#each filteredItems as item}
|
||||
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
||||
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue