Coder Social home page Coder Social logo

Types of events about ff4s HOT 1 OPEN

johnynek avatar johnynek commented on July 3, 2024
Types of events

from ff4s.

Comments (1)

buntec avatar buntec commented on July 3, 2024 1

The problem is that the onInput modifier is not specific to the element to which it is applied. (Unfortunately, this lives in the generated part of the code so I cannot provide a link here, but you can check locally the GlobalEventProps.scala file under src_managed.) Incidentally, there is a nice solution to this problem in the ff4s-shoelace project (idea stolen from https://github.com/sherpal/LaminarSAPUI5Bindings). See for example https://github.com/buntec/ff4s-shoelace/blob/7ce368d6f975c0f6663a9db3a2c36ac3e2b2d153/ff4s-shoelace/src/main/scala/ff4s/shoelace/Textarea.scala#L35. Here the onInputmodifier is made more precise. In particular, the target attribute has the exact type of the element. The downside to this approach is that you have to prefix things like onInput with the element type: sl.TextArea(sl.TextArea.onInput := ...) etc. Achieving a similar thing for non-web-components would require changes in the domtypes project, I think, where all the codegen heavy lifting resides.

from ff4s.

Related Issues (4)

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.