allianz / ng-aquila

Angular UI Component library for the Open Insurance Platform
https://allianz.github.io/ng-aquila/
Other
213 stars 38 forks source link

[NxMultiSelectComponent] My filterfn should be used on filter change #69

Closed gkaragiannidis-dev closed 2 months ago

gkaragiannidis-dev commented 3 months ago

Title NxMultiSelectComponent

In the component the _onFilterChange does not use the filterFn if query is empty

Expectation

I would expect it to do that even if the query is empty

Extra

On a further note why don't you expose the (filterInput) in a similar way to NxDropdownComponent?

Phil147 commented 3 months ago

Hi @gkaragiannidis-dev can you provide an example that shows what you are trying to do and why the filterFn should be called when the input is empty? The assumption here is, that if the filter input is empty the list should not be filtered.

Or is your use case actually that you want to do some form of side effect when the user types and you are simply using the filterFn for this right now, which it is not designed for? Then the point is actually that you are missing that additional Output and not that the filterFn should be called with empty values.

gkaragiannidis-dev commented 3 months ago

For my specific case, yes it will be a side effect, if I had the additional output, I would not need to provide my own filterfn.

I understand your point about the "should not be filtered". My impression was that if I provide my own filter i should handle everything.

I guess just the output would do.

Phil147 commented 2 months ago

Hi @gkaragiannidis-dev we added a filterInput output in v18.3.0 🙌