Tag mounted with data-is="{some expression}" is not updating #2102

Closed
marcel-se-best opened this Issue Nov 26, 2016 · 7 comments

Projects

None yet

4 participants

@marcel-se-best

Help us to manage our issues by answering the following:

  1. Describe your issue:
    If you mount a child tag with data-is="{expression}" it is not updation after the parent tag updates.
    If you mount a child tag without expression e.g. data-is="child_one" it updates if parent is updated.
<app>
    <div data-is="child_{expression}" />

    <script>
        this.expression = "one";
    </script>
</app>

<child_one>
    <h1>Child-One</h1>
</child_one>
  1. Can you reproduce the issue?

  2. On which browser/OS does the issue appear?
    Chrome 54

  3. Which version of Riot does it affect?
    Riot 3.0.1

  4. How would you tag this issue?

  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance
@marcel-se-best marcel-se-best changed the title from Tag mounted with data-is="{some expression}" is not updation to Tag mounted with data-is="{some expression}" is not updating Nov 26, 2016
@rsbondi rsbondi added the bug label Nov 27, 2016
@rsbondi rsbondi self-assigned this Nov 27, 2016
@rsbondi rsbondi closed this in #2105 Nov 27, 2016
@rsbondi rsbondi added the fixed label Nov 27, 2016
@GianlucaGuarini
Member

I will close this issue once riot@3.0.2 will be released

@rsbondi rsbondi referenced this issue Dec 4, 2016
Closed

"data-is", "dynamic mount" confused me #2117

3 of 7 tasks complete
@GianlucaGuarini
Member

fixed in riot@3.0.2

@Qlio
Qlio commented Dec 9, 2016

I think this one isn't fixed in riot@3.0.2.

  <div id='#main' />
  riot.mount('#main', 'project');
  self.update();

and in my project tag:

this.on('update', () => {
    console.log('hello');  // Never called.
});

on update function never called. Even after mount.

@rsbondi
Contributor
rsbondi commented Dec 9, 2016

working for me?

@Qlio
Qlio commented Dec 9, 2016

ah, sorry I think I wrote in wrong place. Can u help me with this case?

@rsbondi
Contributor
rsbondi commented Dec 9, 2016

update has changed to not being called on mount so you will have to listen to that also

@Qlio
Qlio commented Dec 9, 2016

but child's update not called when parent's update called?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment