grafana / scenes

Build Grafana dashboards directly in your Grafana app plugins.
https://grafana.com/developers/scenes
Apache License 2.0
141 stars 21 forks source link

LiveNowTimer: The constructor doesn't receive a valid state #662

Closed ivanortegaalba closed 7 months ago

ivanortegaalba commented 7 months ago

Problem Using a boolean as a scene object state was causing errors where "enable" in the state was the state itself. This was discovered while creating tests for this PR. This state appears when calling enable() method even when using properly the initialization. This is because SceneObjectState expects to receive as parameter always the scene state

Captura de pantalla 2024-03-29 a las 17 27 01

Solution The constructor parameters should be state timer. Also create some tests

📦 Published PR as canary version: 4.0.5--canary.662.8483224466.0
:sparkles: Test out this PR locally via: ```bash npm install @grafana/scenes@4.0.5--canary.662.8483224466.0 # or yarn add @grafana/scenes@4.0.5--canary.662.8483224466.0 ```
grafanabot commented 7 months ago

:rocket: PR was released in v4.2.1 :rocket: