Skip to content

If initialised programmatically, input field does not keep floating label outside #1557

@nerdess

Description

@nerdess

The first input is initialized the classic way, using the data-mdb-input-init attribute - it works fine.

The second input is initialized using the method described here https://mdbootstrap.com/docs/standard/forms/input-fields/#section-dynamic-input-initialization - but on blur, the label flows back into the input.

Image

This is the code snippet used

import { Input } from 'mdb-ui-kit';

document.querySelectorAll('.form-outline').forEach($formOutline => {
    new Input($formOutline).init();
 });

How can I prevent the labels from flowing back on blur when using the dynamic input initialization?

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