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

regression 7.x-->9.x [update() inside of onMounted()] #2985

Closed
1 of 7 tasks
qlbit-com opened this issue Aug 23, 2023 · 4 comments
Closed
1 of 7 tasks

regression 7.x-->9.x [update() inside of onMounted()] #2985

qlbit-com opened this issue Aug 23, 2023 · 4 comments

Comments

@qlbit-com
Copy link

qlbit-com commented Aug 23, 2023

Help us to manage our issues by answering the following:

  1. Describe your issue:
    rendering is broken when update() is called inside of onMounted().
    like
<my-tag>
 <ql-flex row> <!--this is row-oriented toolbar, content of it collection of buttons accepted via <slot/> --> 
   <ql-button text='A' />
   <ql-button text='B' />
   <ql-button text='C' />
 </ql-flex>

 <script>
   export default {
     onMounted()
     {
   //    this.update()  // <-- uncomment to reproduce
     }
   }
 </script>
</my-tag>

that is a regression between ver 7.x and 9.x

when it works
image

when it fails -- toolbar becomes vertically oriented, hovering over buttons produces this rendering:
image

it is likely not a compiler issue as rendering works when compiler 9.0.3 is used with riot client ver 7.1.0
though rendering is broken when compiler 9.0.3 and riot client 9.0.3 is used

use case for having update() inside of onMounted() -- build default UI then request additional data
from server to build user-specific UI based on user-specific settings stored on the server.

please advise if using update() inside of onMounted() is legal.

  1. Can you reproduce the issue?
    https://plnkr.co/edit/ByNtrQNBxZOETBW0
    see my-tag.html -- uncomment to reproduce

  2. On which browser/OS does the issue appear?
    win10(64bit) \ chrome 115.0.5790.173

  3. Which version of Riot does it affect?
    riot 9.x

  4. How would you tag this issue?

  • Question
  • Bug
  • Discussion
  • Feature request
  • Tip
  • Enhancement
  • Performance
@exside
Copy link

exside commented Aug 24, 2023

Just check a few random tags of mine, using 9.0.3 runtime + runtime compiler, and I'm definitely calling .update() with onMounted, not seeing any issues so far, so maybe it's specific to your component?

image

EDIT: Looking at your example, it seems props.row first comes in as an empty string (expected) and then basically disappears on the next call (well it's technically undefined)

image

but it is indeed strange, gotta say...

@qlbit-com
Copy link
Author

qlbit-com commented Aug 24, 2023

it looks like issue is embedded style related. and nicely reproducible, see plunker link.
also, I was using component's code since ver 6 and all was working just fine until ver 9.
if you use my plunker to refer to ver 7 and use update() in onMounted() it will still work.

@GianlucaGuarini
Copy link
Member

It's a regression bug. @qlbit-com thank you for reporting it and it should be quite trivial to fix it. I will fix it in the next patch release

@GianlucaGuarini
Copy link
Member

Fixed in riot@9.0.4 Thanks for reporting it!

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

3 participants