Skip to content

BUG-Error in how adapter uses lambda expression #1336

Open
@enarroied

Description

@enarroied

Bug description
The documentation about the tree elements has an error in how it displays lambda expressions: it shows them between quotes "", but it shouldn't.

Here's the link: https://docs.taipy.io/en/release-4.1/refmans/gui/viselements/generic/tree/#__tabbed_7_3

This is the wrong code:

import taipy.gui.builder as tgb
...
tgb.tree("{user_sel}", lov="{users}", type="User", adapter="lambda u: (u.id, u.name, u.children)")

--> adapter should be rewritten: adapter=lambda u: (u.id, u.name, u.children) without quotes.

How I'd fix it
In the Markdown doc, this is referenced as such:

!!! taipy-element
    default={user_sel}
    lov={users}
    type=User
    adapter=lambda u: (u.id, u.name, u.children)

I think it should be written like this:

adapter:f=lambda u: (u.id, u.name, u.children)

I'd be happy to take this issue if you agree :)

Metadata

Metadata

Assignees

Labels

💥MalfunctionAddresses an identified problem.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions