baoagency / polaris_view_components

ViewComponents for Polaris Design System
https://polarisviewcomponents.org
MIT License
376 stars 51 forks source link

Any examples of filters and resource list? #344

Closed resistorsoftware closed 9 months ago

resistorsoftware commented 9 months ago

I once made a slick Resource list with filters and buttons and options.. lalala. It worked, but it was all React and that stuff worked.

OK, fast forward to this PVC. I have a slick resource list presenting all my items. I need to check some of them off, filter some of the list for underlying conditions. and act on the checked off selected items. Wee!

There is zero JS support for this. So can someone help me out here? My list is contained in a Stimulus controller. So I know that comes to life and I can then access things inside my PVC. Is it that simple? I lay down a button that I click, and then go harvest ticked off resource items using whatever DOM tricks I need? Filters, I do the same? You type in "foo" and I then listen to any keystrokes in the filter text box, and essentially re-render the items to match?

It seems weird to be asking, but I am just looking for confirmation here. I am on my own to write all that Stimulus JS from scratch and run with it any way I can?

kirillplatonov commented 9 months ago

It seems weird to be asking, but I am just looking for confirmation here. I am on my own to write all that Stimulus JS from scratch and run with it any way I can?

Of course you should build it. Who overwise will build it for you? You can hire developer familiar with Hotwire to do this as well.

resistorsoftware commented 9 months ago

I am unfamiliar with the exact pattern experienced PVC developers use here. Knowing which component parts emit events, and how to recycle the underlying data without being a dolt. Since there are zero examples, that is the source of my question. I am completely capable of writing JS so I don't need to hire anyone. I just wanted to ensure I do the obvious thing, and you have confirmed that for me.

Note to self. PVC could use some blog posts about hooking it up to a Rails App to tie together not only how to render to components, but how to take advantage of them in your Apps via Stimulus.