Giter VIP home page Giter VIP logo

Comments (3)

daniel-dx avatar daniel-dx commented on May 26, 2024
  1. Q:Is there a way to debug dx expressions? I'm happy to figure them out - but find it hard without being able to see them evaluate.
    A: You can use function style of dx to debug the value, refer to https://github.com/ncform/ncform#dx-expression

  2. Q: My idea was to use a rule like the example below on each of the 3 fields and to tell each one to fire the other 2 rules, so that they all update at roughly the same time.
    A: Refer to this example: https://codepen.io/daniel-dx/pen/eYBKXVL. But there has some problems:

    1. you must hide the "*" symbol by yourself (may be by overriding the style)
    2. there is a bug that when the required message show and the filed's rule become no required, the required message cannot hide automatically(this i will fix it as soon as possble)

from ncform.

DerickO-Nedbank avatar DerickO-Nedbank commented on May 26, 2024

Thanks Daniel!

I totally missed the note about function-style dx expressions - that's really brilliant. Does this mean that the dx-syntax is just there to enable a shorter form for writing very simple expressions or is there a performance penalty in choosing one style over the other? I would imagine the dx-expressions must be slightly slower - since they need to be parsed/processed? (probably not even measurable for most common situations).

I'll leave this issue open until the bug is fixed. If you have another issue tracking the bug - please feel free to close this one.

from ncform.

daniel-dx avatar daniel-dx commented on May 26, 2024

If you want to pass the schema to server, you can only use the string-style dx.
And if you just write the schema in the code, you can feel free to use the function-style

from ncform.

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.