[lvgl] Fix crash when using lvgl.list.add (#19177)

This commit is contained in:
Clyde Stubbs
2026-09-13 06:12:08 +10:00
committed by GitHub
parent ebb9037ea1
commit 533002c41e
2 changed files with 19 additions and 1 deletions
+15 -1
View File
@@ -30,6 +30,18 @@ binary_sensor:
widget: button_button
state: pressed
globals:
- id: counter
type: int
script:
- id: add_row
then:
- lvgl.list.add:
id: test_list_id
label:
text: row
lvgl:
id: lvgl_id
rotation: 90
@@ -1291,7 +1303,7 @@ lvgl:
then:
- logger.log:
format: "table selected row %u col %u"
args: [row, column]
args: [(unsigned)row, (unsigned)column]
on_click:
then:
- lvgl.table.cell.update:
@@ -1347,10 +1359,12 @@ lvgl:
- logger.log:
format: "list entry added at %d"
args: [list_index]
- lambda: "id(counter)++;"
on_remove:
- logger.log:
format: "list entry removed at %d"
args: [list_index]
- lambda: "id(counter)--;"
on_click:
- lvgl.list.add_text:
id: test_list_id