symphonists/subsectionmanager

Filtering by Select Box

Closed this issue · 2 comments

I have used filtering with a Select Box and have found that to get the filter box to display, the Select Box needs at least one static option.

Subsection Manager seems to only allow Select Box Filtering when there are static options. Dynamic options chosen from another section don't show the filter box. Having one static option shows the box, and then I can manually type in one of the dynamic options that I know are available, and it filters perfectly fine.

Changing line 198 of field.subsectionmanager.php to use $field->get('dynamic_options') instead of $field->get('id) fixes this.

If I get time I'll pull request it. Going on holiday...

I have to actually do an if else, to treat each field differently (selectbox, taglist), I will definitely send a pull request.

The problem of dynamic options is (and the same is true for SBL values) that they can be infinite. I think this was the reason why I chose to only include static options because SSM loads all options of all possible subsection with select boxes to populate the tag list underneath the filtering input.

These kind of options need a more intelligent interface: something that is fetching values asynchronously on demand, like a contextual menu that pops up as soon as you type anything in the filter box (similar to user name completion here on Github).

As I mentioned on one of your other issues, the logic behind all these things should be tackled by the core relationship management. The problem is that the core is broken and this is why people are either unhappy with SBL or SSM. The core has to be fixed here, different interfaces are needed on top of that – simpler ones like SBL and more advanced like SSM.