happyx icon indicating copy to clipboard operation
happyx copied to clipboard

components not rerendering with the rest of the dom 🐛

Open quimt opened this issue 1 year ago • 1 comments

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 avatar Feb 20 '24 02:02 quimt

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

Ethosa avatar Feb 27 '24 06:02 Ethosa

Closed after a long wait

Ethosa avatar Jun 27 '24 04:06 Ethosa