Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin does not work with shadcn Input component #2

Open
dinogit opened this issue Sep 5, 2023 · 0 comments
Open

Plugin does not work with shadcn Input component #2

dinogit opened this issue Sep 5, 2023 · 0 comments

Comments

@dinogit
Copy link

dinogit commented Sep 5, 2023

Description:

Steps to Reproduce:

  • Install ui.shadcn.com with Vite. Add this code:
const { getInputProps } = useInputMask({
    mask: 'One does not simply walk into AAAAAA',
  });

  return (
    <div>
      <h1>Overview</h1>
      <div className="w-[240px] mt-12">
        <Label>Label</Label>
        <Input name="number" {...getInputProps} onChange={e => {
          // Your onChange handler gets the output of the hook (won't trigger if the input is invalid)
          console.log(e.target.value);
        }} />
      </div>

    </div>
  );

Expected Behavior:

  • Input should be masked

Actual Behavior:

  • Input is not masked

Error message: No error message.

Note: Update documentation. Import only functions if :

import { useInputMask } from '@code-forge/react-input-mask';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant