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

Update default type of FieldLabel to div instead of label #528

Open
IMythx opened this issue Jul 11, 2024 · 2 comments
Open

Update default type of FieldLabel to div instead of label #528

IMythx opened this issue Jul 11, 2024 · 2 comments
Labels
breaking change ready Assumed ready enough to start type: feature

Comments

@IMythx
Copy link

IMythx commented Jul 11, 2024

Update the default element type of FieldLabel to div instead of label to prevent unexpected behaviour.

Example: When using an AutoField component as a child of FieldLabel, clicking the item within an array item triggers a remove action for the array item. This is because the element is a label by default.

@chrisvxd
Copy link
Member

Hi @IMythx. I don't think this is a bug, as it's HTML functionality, but I think we should consider setting the default for FieldLabel to div to prevent this kind of behaviour.

I'll update the title and mark as a feature.

@chrisvxd chrisvxd changed the title FieldLabel bugged Update default type of FieldLabel to div instead of label Jul 11, 2024
@chrisvxd chrisvxd added ready Assumed ready enough to start type: feature breaking change labels Jul 11, 2024
@IMythx
Copy link
Author

IMythx commented Jul 11, 2024

Hi @IMythx. I don't think this is a bug, as it's HTML functionality, but I think we should consider setting the default for FieldLabel to div to prevent this kind of behaviour.

I'll update the title and mark as a feature.

ok but still why focusing on the array item (via clicking on the label) would trigger a remove action t o one of the array items(usually the first one)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change ready Assumed ready enough to start type: feature
Projects
None yet
Development

No branches or pull requests

2 participants