Avaiga / taipy

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

[πŸ› BUG] Can't delete scenario using scenario visual element #2219

Closed AlexandreSajus closed 1 week ago

AlexandreSajus commented 1 week ago

What went wrong? πŸ€”

This button is cool: image

But it does not delete the scenario

Use this code to reproduce:

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

from taipy import Config
import taipy as tp

def update(input):
    return None

inputs_cfg = Config.configure_data_node("inputs")
outputs_cfg = Config.configure_data_node("outputs")
taska_cfg = Config.configure_task(
    "taska", function=update, input=[inputs_cfg], output=[outputs_cfg]
)

scenario_cfg = Config.configure_scenario(id="scenario", task_configs=[taska_cfg])

tp.Orchestrator().run()
scenario = tp.create_scenario(scenario_cfg)

with tgb.Page() as page:
    with tgb.Page() as page:
        tgb.text("# *Inventory Management* - Forecast **Scenarios**", mode="md")
        tgb.html("hr")

        with tgb.layout("20 80", columns__mobile="1"):
            with tgb.part("sidebar"):
                tgb.text("**Create** and select scenarios", mode="md")
                tgb.scenario_selector("{scenario}")

            with tgb.part("main"):
                tgb.html("br")
                tgb.scenario("{scenario}")

if __name__ == "__main__":
    Gui(page=page).run(title="Dynamic chart")

Version of Taipy

4.0.1.dev1

Acceptance Criteria

Code of Conduct

AlexandreSajus commented 1 week ago

FredLL pushing a PR on Friday at 11 PM 🫑