-
-
Notifications
You must be signed in to change notification settings - Fork 245
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
Bootstrap 4 ListField / ListAddField Always Tries to Set Count to 1 #875
Comments
Hi @LordA98, |
Hi @Monteth, Sorry for the delayed response. I will take a look at the reproduction environment now. |
Okay, it seems to be caused by the This is my form:
This is my schema:
Removing the So, is this related to Uniforms or to Simpl Schema? |
Hi @LordA98. I've dug into it today, and it's indeed hard to debug. So, let me describe the problem first and then how to fix it.
Now, most probably adding @Monteth: Could you add a unit test to verify this problem and this solution? 🤞 |
Hi,
I'm using the
bootstrap-4
theme. When I use the default ListItem component or a custom ListItem component, clicking 'Add' the first time always tries to set the count to 1.For example, if the initialCount=0, clicking add once adds one ListItemField. This works as expected.
However, if the initialCount=1, clicking add once does nothing, clicking add again adds a second ListItemField.
If the initialCount=2, clicking add once removes the second ListItemField so that there is only 1. Clicking it again then adds a second ListItemField back.
This occurred using this code:
It was also happening for my custom list field, but I'm assuming the fix will apply to both.
The text was updated successfully, but these errors were encountered: