Comments (7)
Yeah. It looks like a bug. I will work on it.
from alpaca.
Just checked in a patch and please check out this new array example
http://www.alpacajs.org/examples/components/fields/array-field.html (example 7)
Let me know if it fixes your issue.
Yong
from alpaca.
Outstanding! Love the new test case ;-) and my code is working; hurray.
There remains a related issue that I didn't mention earlier because I wasn't sure if it is the same thing or not... but it is related.
To reproduce this issue:
- click the add button to create an item.
- click the item's add button to create a second item.
- verify the two item's url fields are properly named _0_url and _1_url
- click the second item's add button to create a third item.
- verify the third item's url field is named _2_url
- click the first item's add button to create a forth item.
Expected: The item's url fields should be _0_url, _1_url, _2_url and _3_url
Actual: The item's url fields are _0_url, _1_url, _1_url and _2_url
I suspect this is a tricky problem because it might require renaming fields.
Your patch is sufficient to unblock me for now and I am so grateful for your help resolving this problem.
Thanks!
-- Bob
from alpaca.
Yeah. That is another bug. I will work on it to get it fixed.
Thanks!
Yong
from alpaca.
Just checked in another fix. I think it should fix the issue.
Let me know if it still causes the issue.
Thanks!
Yong
from alpaca.
Works perfectly! Also tested removing items and the enumeration is correct. Well done and thank you.
from alpaca.
I think this bug is back. To reproduce this issue:
- Visit the Array Field documention page at http://www.alpacajs.org/docs/fields/array.html
- Scroll down to example 7
- Click "Add New Item" and then the topmost (+) button twice more.
- Click on one of the radio buttons in the second item.
- Click one of the radio buttons in the second item and observe that your selection in the previous step is removed.
- Confirm the problem by looking at the
name
attributes in the second and third items. They are both_1_type
where you would expect the third item in the array to be named_2_type
Same behavior on my personal project with Alpaca 1.5.17
EDIT: I take it back. I built master from source and the behavior is correct. It must have been fixed again after 1.5.17 was released.
from alpaca.
Related Issues (20)
- Layout/template for ArrayField items?
- format: uri does not accept an IP address HOT 1
- Multiselect order
- Add new item in Array object with multiple selected
- Plans on proceeding with broken TAG-field?
- [Ask] change helper text color
- [Ask] Accessing options of a field from another field
- How do I trigger the per-field validation chain when ANY field changes on the form?
- "too much recursion" with jQuery 3.4 using enum
- textarea data not being set properly
- Missing null checkes
- When Creating A Form Builder, How do I make the checkbox multiple select to be true as default? HOT 1
- Conditional Dependency failing
- Field is excluded in the Alpaca.getValue() when dependent on hidden field
- Unable to set uploaded images in postRender
- Repo Future? HOT 3
- After load form and the first running function in the 'events > change' in the select field the validation stops work
- Is this a bug with the "valid" and "invalid" callbacks inside a View?
- Alpaca Gitana
- $('MyForm').alpaca() causes "Maximum call stack size exceeded" for specific Select Field
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alpaca.