Code Monkey home page Code Monkey logo

Comments (5)

alfonsogarciacaro avatar alfonsogarciacaro commented on July 19, 2024 1

Hmm, select_multiple could work but although we're adding helpers for other things like React.memo I'd prefer to keep the HTML native elements untouched so things like html-to-elmish work. I like the solution of adding a different prop, maybe ValueMultiple so it works better with autocompletion, let's do that!

from fable-react.

nojaf avatar nojaf commented on July 19, 2024

Hmm, I guess in both cases there is a possibility that the user can make mistakes.
With Multiple false you still allow the use of an array.

Perhaps you need a select_multiple function and remove the Multiple property all together.
Would not break the select function that much but introduce some duplication.

from fable-react.

MangelMaxime avatar MangelMaxime commented on July 19, 2024

@alfonsogarciacaro Hum...

I do like the fact that we are force to use string for Value. For example, if you works with number and make Value of obj then users would be tempted to pass an int or float value directly and I am not sure it will have the correct behavior.

Perhaps, we can provide something like [<CompiledName("value")>] MultipleValue of string [] ?

from fable-react.

MangelMaxime avatar MangelMaxime commented on July 19, 2024

Also using U2<string, string[]> will make the code more cryptic and harder to write.

input [ Value !^"my-value"]

IMHO we should avoid this at all cost :)

from fable-react.

alfonsogarciacaro avatar alfonsogarciacaro commented on July 19, 2024

Actually, I just noticed I had turned Value of string to Value of obj and month ago and I had forgotten 😅 Anyways, I've changed it back to string and added ValueMultiple of string[]. Not sure how it can work with SSR exactly so for now I just disabled it.

from fable-react.

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.