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

components not rerendering with the rest of the dom πŸ› #246

Open
quimt opened this issue Feb 20, 2024 · 1 comment
Open

components not rerendering with the rest of the dom πŸ› #246

quimt opened this issue Feb 20, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@quimt
Copy link

quimt commented Feb 20, 2024

Describe the bug πŸ›
Printing on Chrome should effectively impose new styling on the entire document, triggering a rerender. However, iterated components fail to rerender while the rest of the DOM updates.

To Reproduce πŸ‘¨β€πŸ”¬


import happyx, strformat, random

component ShowNum:
  n: int
  html:
    "{self.n.val:04}"

randomize()

appRoutes("ROOT"):
  "/":
    for i in 1..7:
      let n = rand(9999)
      tDiv: tSpan:
        "{n:04} = "
        ShowNum(n)

The data are correctly matching when the page renders the first time.
image

But trigger a rerender with the print dialog, and the components' values on the right side do not change, while the values on the left are given new random values.

image

Expected behavior πŸ€”
It's acceptable for the whole page to rerender when triggering a print or on other occasions, but this should rerender the whole page, generating components afresh along with the other DSL content.

Please complete the following information πŸ“ƒ
Chrome 121.0.6167.184-1, Nim 2.0.0, HappyX 3.8.12 @#head

@quimt quimt added the bug Something isn't working label Feb 20, 2024
@Ethosa
Copy link
Contributor

Ethosa commented Feb 27, 2024

But trigger a rerender with the print dialog, and the components' values on the right side do not change, while the values on the left are given new random values.

I'm not sure about it.
In my yandex browser (chromium) this not works - DOM not updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants