question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PinInputField does not have the props specified on documentation

See original GitHub issue

Description

When I wanted to disable a PinInputField I found that the isDisabled prop didn’t exist

Link to Reproduction

sorry no link required

Steps to reproduce

  1. In VS Code:
    <HStack>
      <PinInput id="pinid">
        <PinInputField isDisabled />
      </PinInput>
    </HStack>
  1. Here’s a screenshot of the available props beginning with ‘is’: image

  2. This is the error I get in the console Warning: React does not recognize the isDisabled prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase isdisabled instead. If you accidentally passed it from a parent component, remove it from the DOM element.

  3. I looked a bit further and noticed that none of the props stated in the documentation are available. (https://chakra-ui.com/docs/form/pin-input#pininputfield)

Chakra UI Version

1.6.10 & .12

Browser

Firefox (but not a browser issue)

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
primos63commented, Nov 15, 2021

As I tried to explain earlier, having isDisabled on the PinInputField is not going to get you any closer either. It’s also not inline with Pin Input designs you see on sites (at least not the ones I’ve been to). No other toolkit that I know of has implemented this except for NativeBase. However, after release 3.0.6 it quietly disappeared from the website examples and docs. You should be able to get the functionality you want either by working with the PinInput and PinInputField components or by cloning the component and changing the usePinInput hook to get the desired functionality.

If you are having difficulty figuring out what needs to be done you can have a look at the CodeSandbox I created. It’s not perfect, but it’s certainly a good start.

1reaction
primos63commented, Nov 12, 2021

I log into my Chrome tablet using a 6 digit pin code. Inputs 2-6 are not disabled. I do not get to the next field unless the one I’m on is filled. That is a much better way of designing a component. This is a form field that groups individual components to make the whole. There is no usefulness to a single PinInput. Component validation is done at the group. The pin in total is either valid or invalid.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Pin Input - Chakra UI
PinInputField : The text field that user types in - must be a direct child of PinInput . Usage#. The most common use...
Read more >
Pin Input - Chakra UI - YouTube
"Chakra UI is a simple, modular and accessible component library that gives you the building blocks you need to build your React ...
Read more >
How passing props to component works in React
Master how to pass props (properties) to components in React with this useful beginner's guide, including demo code.
Read more >
property 'ref' does not exist on type 'intrinsicattributes - You.com
I don't see any error when replicate your code. But it does have 1 error at runtime: Warning: Function components cannot be given...
Read more >
Recently Active 'chakra-ui' Questions - Page 7 - Stack Overflow
This is a very specific question, but I am using the Chakra UI component library for React and I want to import my...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found