Skip to content

Is there a way to make the mask parameter optional? #51

@monolithed

Description

@monolithed

As far as I understand, the parameters mask and replacement are optional, but it doesn't work without them.
Is it possible to omit the mask so that the number of characters isn't limited?

I have a few cases where I don't need to change the input — just capitalize the first letter, add separators, or a period at the end:

    const maskRef = useMask({
        track: ({inputType, value, data, selectionStart}) => {
            if (data && selectionStart === 0) {
                return data.toUpperCase();
            }
        }
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions