Coder Social home page Coder Social logo

Comments (3)

Munawwar avatar Munawwar commented on July 1, 2024

This can be done when creating a new instance of a component:

<lui-button onclick="onClickHandler"></lui-button>

However this cannot be done for one common use case: Most of the components in an app will inherit the wrapper div tag of Lui.Component. Hence they cannot add onclick etc to the wrapper div. So this feature wouldn't satisfy a common use case of a component trying to add event handlers to it's own root element (for components inheriting templates). So a JS solution is still required for this.

So I am thinking whether to have two ways to do similar things...hmmm.

from lithium-ui.

ashish-soni avatar ashish-soni commented on July 1, 2024

Within component template, are events supported like with syntax like this ?
<input type="button" value="Submit" on-click="handleClick()">

from lithium-ui.

ashish-soni avatar ashish-soni commented on July 1, 2024
  1. Also for custom-events fired by component, you should have provision to assign callback by container.
  2. Can container refer to component by object and call its methods ?

from lithium-ui.

Related Issues (3)

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.