Vestride / Shuffle

Categorize, sort, and filter a responsive grid of items

Home Page:https://vestride.github.io/Shuffle/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

FILTER_ATTRIBUTE_KEY should be per-instance, not static

Bilge opened this issue · comments

commented

Is your feature request related to a problem? Please describe.
It should be possible to use different filter keys with different Shuffle instances.

Describe the solution you'd like
FILTER_ATTRIBUTE_KEY should be a per-instance option instead of static.

Describe alternatives you've considered
There appear to be no alternative solutions since changing the static global FILTER_ATTRIBUTE_KEY affects all instances instead of instances independently.

Can you describe the use case for this?

commented

Possible use case: some elements use one key, others use another.

I think the point here is that, from a purely engineering perspective, a static option is incorrect. We know this because we can set all instances to have the same custom key with per-instance options if we want the current behaviour, but the reverse is not true. That is, we cannot have different settings per instance with a static option.

I understand that providing an option per instance is a more flexible solution, but how would me making this breaking change help your use case?