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

PinInput required attribute not added to input elements #6588

Closed
1 of 2 tasks
henrymcl opened this issue Jul 25, 2024 · 3 comments
Closed
1 of 2 tasks

PinInput required attribute not added to input elements #6588

henrymcl opened this issue Jul 25, 2024 · 3 comments
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@henrymcl
Copy link

henrymcl commented Jul 25, 2024

Dependencies check up

  • I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

{
		"@mantine/core": "^6.0.19",
		"@mantine/dates": "^6.0.21",
		"@mantine/dropzone": "^6.0.21",
		"@mantine/form": "^6.0.21",
		"@mantine/hooks": "^6.0.19",
		"@mantine/notifications": "^6.0.21"
}

package-lock.json:

{
		"node_modules/@mantine/core": {
			"version": "6.0.21"
		},
		"node_modules/@mantine/dates": {
			"version": "6.0.21"
		},
		"node_modules/@mantine/dropzone": {
			"version": "6.0.21"
		},
		"node_modules/@mantine/form": {
			"version": "6.0.21"
		},
		"node_modules/@mantine/hooks": {
			"version": "6.0.21"
		},
		"node_modules/@mantine/notifications": {
			"version": "6.0.21"
		}
}

What package has an issue?

@mantine/core

What framework do you use?

Vite

In which browsers you can reproduce the issue?

Chrome

Describe the bug

PinInput required attribute is not added to input elements, instead it's added to the parent .mantine-PinInput-root element.

I'm actually using 6.x.x but 7.x.x has it too.

If possible, include a link to a codesandbox with a minimal reproduction

https://codesandbox.io/p/sandbox/pensive-haze-k5n3n3?file=%2Fsrc%2FApp.tsx

Possible fix

No response

Self-service

  • I would be willing to implement a fix for this issue
    I'm stuck at the yarn step so I can't implement a fix
@henrymcl
Copy link
Author

I noticed that the required prop is no longer available in version 7, yet it's really helpful for HTML5 based form validation.

rtivital added a commit that referenced this issue Aug 7, 2024
…ments depending on index with `getInputProps` (#6588)
@rtivital
Copy link
Member

rtivital commented Aug 7, 2024

Will be available with next patch:

<PinInput getInputProps={() => ({ required: true })} />

@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Aug 7, 2024
@rtivital
Copy link
Member

Fixed in 7.12.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

2 participants