Multiselect v List with toggles

Hi all.

I’m building a modal page to filter a list.
I prefer the multi select dropdown but it does not reload values for when a page is revisited.

Users M:M Items

Option 1. Multiselect dropdown component.
✓ Puts the item in the related field in Users table.
✓ Allows select / deselect all
✓ Neat, small real estate.
x Does not reload the toggled values when revisiting the screen

Option 2. Custom list with toggle.
✓ Puts the item in the related field in Users table
✓ Reloads the toggles into the list when revisiting the screen
x Does not allow select / deselect all
x Takes up screen real estate

Does anybody have a better option?

This image shows a second visit to the screen. Toggles not reloading in dropdown.

Hey there @Rozza

Option 2 with a custom list because you CAN create a select/deselect all function.

Here’s how:

On the modal screen, add a hidden input and call it “select all input”, set this as a number type input, then set the default value to 0.

Drop a countdown timer into your custom list and make it really small (and/or invisible by setting the color values to transparent). Set the countdown timer to only visible when “Select all input” is equal to 1. Set the action on the countdown timer to update the item add it to the selected options.

Add your “select all” option to the list. When “select all” is clicked, have that change the input value of the select all input to 1. This will then have all of the list items update.

You can add another action to the countdown timer to set the “select all input” back to 0. Set a condition for this action where list items count is equal to selected items count.

1 Like

Thanks @Flawless. I had been playing with countdown as an option but on another screen, I hadn’t thought about triggering it from a number input. I will give that a shot.

If the dev of the multi-select component is reading… nudge. :wink:

1 Like

Sorry to interfere here - just my 2 cents.

I don’t think that countdown timer will work properly for this. When the list contains 4-5 items - ok, may be yes.
When more - the app is stuck. I’ve spent a lot of time trying to make it work properly (with the idea of creating a tutorial for this) - but even with 10 items it was way too buggy. Both M2M and junction table approaches didn’t work.
I guess the reason is that when 10 countdown timers try to update same property at once (M2M case) or create 10 records in a junction table - Adalo simply can’t handle this workload “spike” efficiently.

Best,
Victor.

I understand what you’re saying @Victor. However, this has worked for me and still works in a couple of apps with just a slight delay when it’s over 20 items.

I don’t believe that I’ve implemented this on a large list of 30+ items.

Yes, it’s situational and may not work well if the list is huge. That being said, it would appear that you do not have a better solution at this time @Victor

Dear @Flawless,

Yes, I do not have better solution.

I just shared my personal experience with countdowns.

And I prefer to outline the possible limitations and pitfalls of the solutions in advance, so that other app makers who use them have clear understanding of possible consequences, and can make an informed decision when to use the solution and when not.
With countdown timer, after I created the very first series of videos how it could be used for bulk operations, I’ve seen too many issues with it when makers try to use it for an unsuitable cases, being frustrated with the result.

Using a boat to cross the pool doesn’t mean that one should use the same boat to cross a large lake.

My apologies for interfering into this thread.

Victor.

This is a learning experience for everyone on a continuous basis, including both me and you @Victor. The no-code field and Adalo both continue to change, adapt, and evolve.

No apology is necessary. I’m all ears if you can come up with a better solution. This is why I tag you from time to time asking for your opinion.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.