Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataTable: Better way to define custom filter with label #4017

Closed
zyf722 opened this issue Jun 2, 2023 · 1 comment
Closed

DataTable: Better way to define custom filter with label #4017

zyf722 opened this issue Jun 2, 2023 · 1 comment

Comments

@zyf722
Copy link

zyf722 commented Jun 2, 2023

Describe the feature you would like to see added

Custom filters registered through FilterService can include a locale during the registration.

Is your feature request related to a problem?

Currently, in the ColumnFilter component definition within the DataTable component, the computed method matchModes() returns directly for custom filters that are not present in primevue.config.filterMatchModeOptions. This results in the inability to display labels for custom filters in the dropdown filter list. In my answer on the Stack Overflow thread linked at the end of the issue, I proposed a temporary solution. However, I believe it is not elegant enough.

Describe the solution you'd like

Modify the FilterService.register() method to specify the locale when registering a filter by adding a parameter.

Describe alternatives you have considered

Modify the matchModes() method to allow custom filters to automatically find localized strings in primevue.config.locale.

Additional context

Stack Overflow answer regarding this issue (authored by me)

@zyf722 zyf722 added Status: Discussion Issue or pull request needs to be discussed by Core Team Type: New Feature Issue contains a new feature or new component request labels Jun 2, 2023
@tugcekucukoglu
Copy link
Member

Issue tracker is used for defects only as part of our commitment to quality and continuous improvement in all areas. Enhancements are collected as valuable community feedback and managed internally so moving this enhancement ticket to our internal project management backlog.

For enhancement requests and other topics, you can open a new topic in PrimeVue disccussions.

@tugcekucukoglu tugcekucukoglu removed Status: Discussion Issue or pull request needs to be discussed by Core Team Type: New Feature Issue contains a new feature or new component request labels Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants