Implementing Search Function in Plasmic CMS Component

hi everyone, what would be the best approach to implement this type of ui/ux?. Text input with a list below that updates when search text input value changes. I am currently using plasmic cms component for listing, not sure if I can integrate a search function though.
Tips and recommendations are greatly appreciated. :slight_smile:

Hi John, how exactly are you expecting your application to work ? For example should the list be updated while the letters are being typed or should the a dropdown with options appear while you type, then only later the search should be executed ?

hi @fmota ,
Just a simple list where options change while the letters are being typed, no dropdowns. :slightly_smiling_face:

You can use a custom code expression, that will allow you to filter your data, something like this:

dataArray.filter(item => 
    item.name.toLowerCase().includes($state.textInput.value)
  );

Let me know if you are a bit familiar with code, if not I can look into creating a example to share with you.

Hi fmota. i am looking for a solution to a similar problem. i am not familiar with code. can you please help creating this. So we are adding a blog section to our website “domyshoot.com” currently it is not being served from plasmic. we are in the process of migration. the blog landing page has a search functionality. our blogs are stored in the plasmic cms. we want to filter the blogs with titles typed in textInput. right now this works only when the full string matches. can you share a solution to this problem. ideally we would like the search to work as soon as a user starts typing showing the list of matching blogs in the dropdown and then showing results even with a single word match

It would be great if you could share an example