GithubHelp home page GithubHelp logo

Comments (12)

jalal246 avatar jalal246 commented on September 27, 2024 1

Hi @ddenev, you are using it in production mode that's why error messages are not clear. I will try to check it out and get back to you.

from dflex.

jalal246 avatar jalal246 commented on September 27, 2024 1

Thanks for sharing the link. I will ship and release it to npm tomorrow.

from dflex.

ddenev avatar ddenev commented on September 27, 2024 1

Thank you, @jalal246!

from dflex.

ddenev avatar ddenev commented on September 27, 2024 1

Hi @jalal246,

just updated to v3.9.10 but still have the same error.

from dflex.

ddenev avatar ddenev commented on September 27, 2024 1

Thank you for the sandbox sample! I noticed that you have added an id prop to the component element
image
which I did not have in my template.

Adding it to my template removed the error. Without it I still get the same error.

I never met this requirement in the documentation though - that the draggable element should have an id attribute - or maybe I wasn't paying enough attention :)

from dflex.

jalal246 avatar jalal246 commented on September 27, 2024

It appears that a generated child text node is triggering an error during registration. Given my limited familiarity with Vue, it seems this node is automatically generated by the template.

For instance, this list triggers an error due to the presence of text elements:

NodeList(6) [text, li#item1, li#item2, li#item3, li#item4, text]

The inclusion of non-HTML Element nodes, such as text nodes, can disrupt the expected behavior and potentially lead to errors in the process.

DFlex won't allow it assuming all elements in the same container should be HTML Element.

https://github.com/dflex-js/dflex/blob/927cab38a0580d15b49b4f177e724e0f70c0aa19/packages/dflex-store/src/DFlexBaseStore.ts#L231C1-L259C1

from dflex.

ddenev avatar ddenev commented on September 27, 2024

But there are no text elements in the rendered DOM:
image

from dflex.

jalal246 avatar jalal246 commented on September 27, 2024

I know, but if you point to the parent element and then do $0.childNodes you can see there's one. It's an easy fix assuming this is a Vue default behavior and not something that can be addressed within the template itself.

from dflex.

ddenev avatar ddenev commented on September 27, 2024

If it's an easy fix, could you please do it then? There is nothing I can do at my end since indeed, this is how Vue works: vuejs/core#8444

from dflex.

jalal246 avatar jalal246 commented on September 27, 2024

@ddenev, Are you sure? I made a quick sandbox and it's working: https://codesandbox.io/s/loving-almeida-sst43z?file=/src/components/ListItem.vue

from dflex.

jalal246 avatar jalal246 commented on September 27, 2024

@ddenev, I should pay more attention to the docs. IDs are required to be unique and should have non-numerical values. So, avoid using an index for IDs.

I'm also working on a Vue playground. I find it much easier to simply copy and paste the code rather than reading the React version.

from dflex.

ddenev avatar ddenev commented on September 27, 2024

Thank you! A Vue playground would be indeed very helpful, looking forward to it.

from dflex.

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.