Skip to content

Form Field of type 'pin' #269

@ueberBrot

Description

@ueberBrot

Description

I'm in the process of updating dependencies in my project.

I’m encountering an issue with the field of type pin.

  • With version 2.11.3 of @saas-ui/react, it looks as expected:

    Image

  • With version 2.11.4 of @saas-ui/react, it looks different and appears as a normal text input:

    Image

Here is the relevant code:

<Form
      onSubmit={onSubmit}
      defaultValues={{
        email: email || '',
        code: code || '',
        password: '',
        passwordRepeat: '',
      }}
      schema={schema as any}
    >
      {({ formState, setError }) => {
        setFormErrorRef.current = setError;
        return (
          <VStack spacing={4}>
            <Field
              name="email"
              type="email"
              label="Email"
              placeholder="Your Email"
            />
            <Field id="code" name="code" type="pin" pinLength={6} label="Code" />
            <PasswordInputField
              name="password"
              type="password"
              label="Password"
              placeholder="Enter Password"
            />
            <PasswordInputField
              name="passwordRepeat"
              type="password"
              label="Repeat Password"
              placeholder="Repeat Password"
            />
            <Button sx={{ alignSelf: 'flex-end' }} colorScheme="teal" size="lg" type="submit" isLoading={formState.isSubmitting}>
              Submit
            </Button>
          </VStack>
        );
      }}
    </Form>

Link to Reproduction

No response

Steps to reproduce

  1. Create a Field from type pin with 2.11.3 of @saas-ui/react
  2. Displayed as expected
  3. Upgrade to 2.11.4.
  4. Displayed differently

Saas UI Version

2.11.4

Chakra UI Version

2.10.4

Browser

Google Chrome 134.0.6998.117

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

No response

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