Avaiga / taipy

Turns Data and AI algorithms into production-ready web applications in no time.
https://www.taipy.io
Apache License 2.0
14.23k stars 1.7k forks source link

[🐛 BUG] Lambda expression not working with new line #1522

Closed FlorianJacta closed 3 months ago

FlorianJacta commented 3 months ago

What went wrong? 🤔

Lambda expressions are not working for no reason.

The second selector is not working.

image

Expected Behavior

It should work.

Steps to Reproduce Issue

from taipy.gui import Gui 
import taipy.gui.builder as tgb

value: int = 10
value_selector = 10

def get_list(value):
    return [str(i) for i in range(value)]

with tgb.Page() as page:
    # Works
    tgb.selector(value="{value_selector}", lov=lambda value: get_list(value))

    # don't work
    tgb.selector(value="{value_selector}",
                 lov=lambda value: get_list(value))

Gui(page=page).run(title="Frontend Demo")

Browsers

Chrome

OS

Windows

Version of Taipy

develop - 7/15/24

Acceptance Criteria

Code of Conduct

FredLL-Avaiga commented 3 months ago

I think I know why