mirror of
https://github.com/immich-app/immich.git
synced 2025-12-04 05:39:46 +09:00
chore(web): unique ID generation (#9932)
* chore(web): automatically generate unique IDs * fix: revert changes to Slider * chore: add test for id store
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
import { fly } from 'svelte/transition';
|
||||
import Combobox, { type ComboBoxOption } from '$lib/components/shared-components/combobox.svelte';
|
||||
|
||||
export let id: string;
|
||||
export let title: string;
|
||||
export let comboboxPlaceholder: string;
|
||||
export let subtitle = '';
|
||||
@@ -33,7 +32,6 @@
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<Combobox
|
||||
{id}
|
||||
label={title}
|
||||
hideLabel={true}
|
||||
{selectedOption}
|
||||
|
||||
@@ -3,14 +3,16 @@
|
||||
import { fly } from 'svelte/transition';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import Slider from '$lib/components/elements/slider.svelte';
|
||||
import { uniqueIdStore } from '$lib/stores/unique-id.store';
|
||||
|
||||
export let id: string;
|
||||
export let title: string;
|
||||
export let subtitle = '';
|
||||
export let checked = false;
|
||||
export let disabled = false;
|
||||
export let isEdited = false;
|
||||
|
||||
let id: string = uniqueIdStore.generateId();
|
||||
|
||||
$: sliderId = `${id}-slider`;
|
||||
$: subtitleId = subtitle ? `${id}-subtitle` : undefined;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user