Avaiga / taipy

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

Add drop-down selectors with multiple values #1834

Open enarroied opened 1 month ago

enarroied commented 1 month ago

Description

Hi, When I use selectors, there isn't a combination that lets me have a multiple-value selector that is also a drop-down.

Solution Proposed

Something like drop-down and check boxes for example. The following doesn't give an error but also doesn't "work":

tgb.selector
    (...
        multiple=True,
        dropdown=True,
        mode="check",)

Another thing that could be great, is if the callback is only called after I select/unselect all my values (when I go out of the drop-down list). Right now, every time I check a box, it calls on_action, so if I check (or uncheck) a lot of boxes, it calls the Callback many times.

Impact of Solution

To give an example, I used a side pane to hold a long list of checkboxes, but it would have been quicker to have this drop-down list, and also more efficient.

Additional Context

No response

Acceptance Criteria

Code of Conduct

FlorianJacta commented 1 month ago

Is your issue with checkboxes or dropdown+multiple in general? You should be able to create a selector with a dropdown, and multiple equal to True at the same time.

enarroied commented 1 month ago

Hi Florian, I think this is what I mean: If your list of values is long (imagine, 50 values like the American states), and they're all selected, your dropdown becomes so crowded that it's almost "theoric". It would be great if you could have a selector that displays a label (eg "Select States"), and when you click on it, it drops down and you select the states.

And even greater if it only calls the Callback when you're out of the selector (not each time you select/unselect a single value) Checkboxes are not the most important, I like them, but it could be done with color gradients like the default.

The feature request is more on the display than on the functional side. Except for the Callback behavior, that is functional.

I hope this makes sense :) Here is how a crowded list looks, it takes too much space in the app: drop-down

FlorianJacta commented 1 month ago

I like it! I also had an issue with this. It would also be great to have a "All" option that will check everything

KunjShah95 commented 3 weeks ago

Kidnly assign it to me

KunjShah95 commented 3 weeks ago

Kindly assign it to me

FlorianJacta commented 3 weeks ago

@KunjShah95 You are already assigned to another issue. For hacktoberfest, we only assign issues one at a time. Please submit a PR on the other issue first, or remove your assignment.

Thank you.

JagjeetChauhan commented 3 weeks ago

@FlorianJacta can you assign this task to me.

mohammed-anwar404 commented 3 weeks ago

hey @FlorianJacta can you assign this issue to me? I am a first-time contributor to Hactoberfest. I would want to work on this issue.

FlorianJacta commented 3 weeks ago

I will assign @JagjeetChauhan, as he was the first one to ask for this issue. Thank you for taking care of it

@mohammed-anwar404, there are many more issues on our repo!

JagjeetChauhan commented 3 weeks ago

Thankyou @FlorianJacta

durveshwagh11 commented 3 weeks ago

pls ssign it to me @FlorianJacta

FlorianJacta commented 3 weeks ago

@durveshwagh11, sorry, this issue has already been assigned. You have many more to take in this repo

quest-bot[bot] commented 3 weeks ago

New Quest! image New Quest!

A new Quest has been launched in @Avaiga’s repo. Merge a PR that solves this issue to loot the Quest and earn your reward.


Some loot has been stashed in this issue to reward the solver!

🗡 Comment @quest-bot embark to check-in for this Quest and start solving the issue. Other solvers will be notified!

⚔️ When you submit a PR, comment @quest-bot loot #1834 to link your PR to this Quest.

Questions? Check out the docs.

sajithcode commented 1 week ago

assign it to me

ruhi47 commented 1 week ago

Hey, If the assigned person is inactive, I can take up the issue. Thank you!

FlorianJacta commented 1 week ago

You can also work on it @ruhi47

akanshSirohi commented 5 days ago

@FlorianJacta If inactive, I can resolve this issue.

FlorianJacta commented 5 days ago

Here you go @akanshSirohi

Manya1103 commented 4 days ago

/assign

Manya1103 commented 4 days ago

please assign it to me

akanshSirohi commented 4 days ago

@FlorianJacta Any suggestions on this approach? I'm just getting started and exploring the project, so I came across this approach we can use.

FlorianJacta commented 3 days ago

That could do the trick! What do you think @FabienLelaquais ?

akanshSirohi commented 3 days ago

@FlorianJacta, you can check out the PR https://github.com/Avaiga/taipy/pull/2168.

I have added functionality to support the requested feature. Now, this syntax can be used:

tgb.selector(
    ...
    multiple=True,
    dropdown=True,
    mode="check",
)

Any suggestions would be helpful for me to continue working on this, including anything else I might need to add or change.

FlorianJacta commented 10 hours ago

Can you create the PR and mention @FredLL-Avaiga and @FabienLelaquais ?

akanshSirohi commented 10 hours ago

Sure

quest-bot[bot] commented 10 hours ago

🧚 @akanshSirohi has submitted PR https://github.com/Avaiga/taipy/issues/2168 and is claiming the loot.

Keep up the pace, or you'll be left in the shadows.

Questions? Check out the docs.