hi guys! I would like to create a filter bar similar to what @Darren_Murphy shows in this video. More specifically, i would like to have 3 or 4 text entry components appearing on the same line like in the video.
How do I accomplish it?
The above is just a fairly simple example of what you can do in terms of custom filtering with data editor logic. For a somewhat more advanced example, check the below video:
If the above video won’t play, paste the following URL into a browser:
https://www.loom.com/share/4398b34185c9435bacdd51b2332db722
Chat GPT suggested using this code in a rich text component but I wasn’t able to implement it successfully: Maybe I didn’t put the code it the right place…
<div style="display: flex; justify-content: space-between; align-items: center;">
<div style="flex: 1; margin-right: 10px;">
<input type="text" placeholder="Text Entry 1" style="width: 100%; padding: 5px; border: 1px solid #ccc; border-radius: 4px;">
</div>
<div style="flex: 1; margin-right: 10px;">
<input type="text" placeholder="Text Entry 2" style="width: 100%; padding: 5px; border: 1px solid #ccc; border-radius: 4px;">
</div>
<div style="flex: 1;">
<input type="text" placeholder="Text Entry 3" style="width: 100%; padding: 5px; border: 1px solid #ccc; border-radius: 4px;">
</div>
</div>
That just looks like a 4 column container with each component inside the container.
2 Likes
ok thanks.
I had actually tried a 3 column container but the components still appeared on separate lines.
Are you previewing in mobile view? The container columns will only be side by side in desktop view. Otherwise, yes, you would have to dig into some CSS.
yes, I’m previewing in mobile mode. How can I get a nice neat bar for mobile?
I don’t want the filter to take up so much room on the page but I want the option to type in filter parameters.
1 Like
Wouldn’t 3 columns in a row be too small on mobile?
it’s kind of small, yes… I’m still testing it out.
Oh, you’ve got the code.
.grid-container .threeColumns {
grid-template-columns: repeat(3, minmax(0px, 1fr));
}
1 Like
hahaha, I actually played around until I got this same code. Was proud of myself
first i tried .3-columns
then, .threecolumns
then .threeColumns
ureka!
1 Like
Can I make the clear search button (done with rich text) right-aligned? And maybe also decrease the font size a little since the boxes are small?
Does the previous code work in this composition?
yes, it works but the button is showing up on the left instead of on the right of the text entry.
Try pasting the code again. I forgot where I saved it.
<!--Delete Button-->
<div class="cross" style="float: right; margin:0px 2px 0 auto;
height: 25px;width: 25px; opacity:0.4;border-radius: 10px;
z-index: 5; filter:invert(0.1);"><img src="https://storage.googleapis.com/glide-prod.appspot.com/uploads-v2/ov2nF5ayQc4wK5jVvF4R/pub/pJe35hcDzEqIcW2idyHc.webp" alt="Cross Button" style="margin-top:-37px;"/></div>
Still works with float-right.
did you get that result from the code i sent?
Mine is number entry instead of a text entry… I think this is the issue.
the number entry has arrows on the right so maybe that’s why my button moved to the left