Skip to content

formDefaults undesired mutation by setting a svelte store #5

@christenbc

Description

@christenbc

bind:value={$formData.title}
bind:value={$formData.url}

For some reason, are mutating the original

const formDefaults = {
    icon: 'custom',
    title: '',
    url: 'https://'
};

this is an undesired behavior since

formData.set(formDefaults);

is setting the values to the previous once, hence the form is not being resetted.

What is going on?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions