Describe the bug.
I’m trying to use vi_list in a JS app on Flipper Zero, but the valueUpdate event does not provide usable data.
According to documentation, the event should return fields like:
However, in practice both fields are undefined.
Reproduction
let eventLoop = require("event_loop");
let gui = require("gui");
let viListView = require("gui/vi_list");
let views = {
config: viListView.makeWith({}, [
{ label: "Port", variants: ["usart", "lpuart"] },
{ label: "Baud", variants: ["57600", "115200", "921600"] },
]),
};
eventLoop.subscribe(views.config.valueUpdate, function (_sub, item) {
// Trying to inspect event payload
print("item_index:", item.item_index);
print("value_index:", item.value_index);
});
eventLoop.subscribe(gui.viewDispatcher.navigation, function (_sub, _item, gui, views, eventLoop) {
if(gui.viewDispatcher.currentView === views.config) {
eventLoop.stop();
return;
}
gui.viewDispatcher.switchTo(views.config);
}, gui, views, eventLoop);
gui.viewDispatcher.switchTo(views.config);
eventLoop.run();
Target
No response
Logs
Anything else?
No response
Describe the bug.
I’m trying to use vi_list in a JS app on Flipper Zero, but the valueUpdate event does not provide usable data.
According to documentation, the event should return fields like:
However, in practice both fields are undefined.
Reproduction
Target
No response
Logs
Anything else?
No response