Changing the first item of a Dropdown

Hey guys,

Screen Shot 2021-05-26 at 6.53.53 pm

Has anybody worked out how to make the empty item have text, something like “- All -” would be good.

Maybe some CSS or funky code like when you need to remove the default styling from a dropdown on IOS.

If not @eve you should add this to the next hackathon…

There are hacky ways around it like using an objects’ name + item “All” or using option sets by using Dropdown’s Option Set converted to list minus item “All” or the worst which is to have a dummy item in the DB called “All” but that’s hacky…

I’d like a better solution

Would You not just use the “Placeholder” property? You can use any item you put in the list as a hook to manipulate it rite?.

Can’t get enough of those Bubble Bits: Brian

Not sure what you mean… The placeholder value won’t show up in the dropdown??..
You can see in the image the placeholder is All Teams, so kind of what you said is what I have done…

I’d like the top item (currently a blank space) to be able to say - All - or for that matter what ever I want, perhaps All Team, I still want it to return a blank value tho. The blank value in a search, with the checkbox ignore empty constraints checked, will return all items

Hi there, @chad5… for what it’s worth, I’ve added such an option in a few apps, and I’ve seen a number of forum posts about it… nothing but hacks, man. So, if someone does know a non-hacky way to do it, I’d love to know what it is. That being said, I’ve kind of adopted a “Is a hack really a hack if it works?” mentality with Bubble (while still trying to do as much as I can the “right” way, of course), and while the answer to that question is probably yes, sometimes you just gotta do what you gotta do, eh? :slight_smile:

Best…
Mike

1 Like

Hi

The only way I know, how to remove that space is by checking the > This dropdown should not be empty…

Yeah but then you can’t select the blank entry to produce a search that contains all results… Thanks for the reply tho.

Haha… yeah the line between hack and accepted practice can be pretty blurred sometimes.

I was hoping someone would know some JS or CSS that could turn the blank spot into some custom text…

This topic was automatically closed after 70 days. New replies are no longer allowed.