Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate w-extend and allow multiple widgets to be bound to the same HTML element #392

Closed
mlrawlings opened this issue Nov 4, 2016 · 0 comments
Assignees
Milestone

Comments

@mlrawlings
Copy link
Member

mlrawlings commented Nov 4, 2016

There is the limitation that a component cannot w-bind to another component.

The following is not currently allowed:

<some-component w-bind onEvent="handleEvent"/>

You can however wrap it, but who wants that extra div?

<div w-bind>
    <some-component onEvent="handleEvent"/>
</div>

The alternative is to use w-extend, which looks like this:

<some-component w-extend onEvent="handleEvent"/>

This actually extends the component and merges it with your component. They share state, etc.
It's a bit confusing and we don't have any documentation for it, but the code lives here and it complicates things when rendering.

We want to add support for the first thing:

<some-component w-bind onEvent="handleEvent"/>

This means allowing a single dom element to be bound to multiple widgets.

@mlrawlings mlrawlings added this to the 4.0 milestone Nov 4, 2016
@patrick-steele-idem patrick-steele-idem changed the title Remove need for w-extend Deprecate w-extend and allow multiple widgets to be bound to the same HTML element Nov 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants