GithubHelp home page GithubHelp logo

Comments (7)

drq avatar drq commented on July 25, 2024

Yeah. It looks like a bug. I will work on it.

from alpaca.

drq avatar drq commented on July 25, 2024

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.

rkylberg avatar rkylberg commented on July 25, 2024

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:

  1. click the add button to create an item.
  2. click the item's add button to create a second item.
  3. verify the two item's url fields are properly named _0_url and _1_url
  4. click the second item's add button to create a third item.
  5. verify the third item's url field is named _2_url
  6. 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.

drq avatar drq commented on July 25, 2024

Yeah. That is another bug. I will work on it to get it fixed.

Thanks!

Yong

from alpaca.

drq avatar drq commented on July 25, 2024

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.

rkylberg avatar rkylberg commented on July 25, 2024

Works perfectly! Also tested removing items and the enumeration is correct. Well done and thank you.

from alpaca.

markneub avatar markneub commented on July 25, 2024

I think this bug is back. To reproduce this issue:

  1. Visit the Array Field documention page at http://www.alpacajs.org/docs/fields/array.html
  2. Scroll down to example 7
  3. Click "Add New Item" and then the topmost (+) button twice more.
  4. Click on one of the radio buttons in the second item.
  5. Click one of the radio buttons in the second item and observe that your selection in the previous step is removed.
  6. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.