mirror of
https://github.com/esphome/esphome.git
synced 2026-09-25 14:00:25 +00:00
[lvgl] Fix crash when using lvgl.list.add (#19177)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user