Implement an easy way to add filters for collections

Create issue
Issue #23 resolved
Christian Oeing repo owner created an issue

For collection, yes something more generic I guess. You can take a look at this maybe : For my specific case, I have a collection of InventorySlotContext, and I want to filter them by ItemType, but right now the only way is to modify the all collection.

Some generic base class for custom filters would be helpful plus a CollectionFilter that can be added as a script, takes a collection as a data binding and provides the filtered collection.

Comments (8)

  1. Christian Oeing reporter

    Filters (Where) and Converters (Select) are quite similar as they take a collection, modify it and provide a new collection. So the new CollectionItemsConverter should be a good starting point to add filters.

    Right now the converter has to be a class derived from ValueConverter class. Maybe delegates/methods plus an attribute to flag them is the better way.

  2. Nikolay Kandalintsev

    Do you have any examples, I can't figure it out how to setup simple filter with ColleectionFilter component.

  3. Christian Oeing reporter

    @nicloay: This feature doesn't exist yet and is not planned for a release yet. It was an idea because I thought such filters would be helpful, especially during prototyping. But it would need a good concept to be useful in a generic way, which would a bit too time-consuming for the moment.

  4. Christian Oeing reporter

    In version 1.13 CollectionAggregations where introduced which might be useful to implement collection filters as they already observe a collection and work with their items to provide a result.

  5. Christian Oeing reporter

    There are already some possibilities, therefore I'll close the issue for now. If another feature should be required, a new specific issue should be created. This one is too unspecific.

  6. Log in to comment