Skip to content

Hiding MDB form elements with if/else blocks throws an error #16

Open
@davidb-wz

Description

Issue
Try to hide some form elements like MDBInput or MDBBtn with Svelte if/else condition and this error appears in the developer console :
Uncaught (in promise) in mdbsvelte.es.js

Reproduce
In App.svelte :

<script>
	import { MDBBtn }from "mdbsvelte"
	let action = "show";
</script>

{#if action === "show"}
	<MDBBtn on:click="{() => action = 'hide'}">Hide this button</MDBBtn>
{/if}

Then npm run dev and check the developer console when clicking the button
Tested in firefox 86 and Google Chrome 88

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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