Skip to content

Commit

Permalink
fix(Select): name now defaults to nanoid()
Browse files Browse the repository at this point in the history
  • Loading branch information
N00nDay committed Nov 13, 2023
1 parent 202b1be commit 5af8851
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/lib/components/select/Select.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@
import Portal from '../portal/Portal.svelte';
import Drawer from '../drawer';
import { twMerge } from 'tailwind-merge';
import { nanoid } from 'nanoid';
export let name: string;
export let name: string = nanoid();
export let error: string | undefined = undefined;
export let placeholder: string | undefined = undefined;
export let value: SelectOption | SelectOption[] | undefined = undefined;
Expand Down
2 changes: 1 addition & 1 deletion src/routes/select/examples.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const props: Prop[] = [
id: '1',
prop: 'name',
type: 'string',
default: ''
default: 'nanoid()'
},
{
id: '2',
Expand Down

0 comments on commit 5af8851

Please sign in to comment.