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

p-columnFilterFormElement with custom template can't adapt according to the matchMode #11466

Closed
yelhouti opened this issue Apr 28, 2022 · 2 comments · Fixed by ThoSap/primeng#1 or #12312
Assignees
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@yelhouti
Copy link
Contributor

yelhouti commented Apr 28, 2022

If you have a PrimeNG PRO Support subscription please post your issue at;

https://pro.primefaces.org

where our team will respond within 4 business hours.

If you do not have a PrimeNG PRO Support subscription, fill-in the report below. Please note that
your issue will be added to the waiting list of community issues and will be reviewed on a first-come first-serve basis, as a result, the support team is unable to guarantee a specific schedule on when it will be reviewed. Thank you for your understanding.

Current Queue Time for Review
Without PRO Support: ~8-12 weeks.
With PRO Support: 1 hour

I'm submitting a ... (check one with "x")

[ ] bug report => Search github for a similar issue or PR before submitting
[X] feature request => Please check if request is not on the roadmap already https://github.com/primefaces/primeng/wiki/Roadmap
[ ] support request => Please do not submit support request here, instead see http://forum.primefaces.org/viewforum.php?f=35

Current behavior
I would like to be able to to use a switch case the same way the default implementation does based the matchMode:
If the matchMode is in: use a multiSelect if equals use a dropdown (this is a simple example).

Expected behavior
It would be great to have in the context the full filterConstraint :

<ng-container *ngTemplateOutlet="filterTemplate; context: {$implicit: filterConstraint.value, filterCallback: filterCallback}"></ng-container>

To reproduce

ngAfterViewInit(): void {
      (<FilterMetadata[]> this.table.filters[name]).push({value: null, matchMode: FilterMatchMode.SPECIFIED})
}

They are displayed the same way

@mertsincan
Copy link
Member

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you reopen the issue so we can include it in our roadmap?
Please don't forget to add your feedback as a comment after reopening the issue. These will be taken into account by us and will contribute to the development of this feature. Thanks a lot for your understanding!

Best Regards,

@ThoSap
Copy link
Contributor

ThoSap commented Nov 27, 2022

Hi, can you please reopen this issue as I have the same use case.

My use case is to implement a custom ColumnFilterFormElement (using the filterTemplate) where based on the type of the column (text, numeric, boolean, date) I show a custom filter menu where the user is also able to filter is null and isNot null.

For example if the type is text, I would like to show a editable autocomplete for all matchModes except is and isNot, where only null filtering is possible (as equals and notEquals already exist for text equality checking).

For this to work, can you please add the full filterConstraint and type to the ColumnFilterFormElements filterTemplate context?
For this to work, can you please add all inputs (full filterConstraint, type, field, prefix, suffix, currency, locale,minFractionDigits, maxFractionDigits, etc.) to the ColumnFilterFormElements filterTemplate context?

@cetincakiroglu cetincakiroglu added this to the 15.0.1 milestone Dec 29, 2022
@cetincakiroglu cetincakiroglu added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Dec 29, 2022
@github-actions github-actions bot added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 29, 2022
@cetincakiroglu cetincakiroglu removed the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
4 participants