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

ColumnFilter in row mode and type date not trigger change when value change #13672

Closed
PierreB40 opened this issue Sep 14, 2023 · 8 comments · Fixed by #13674
Closed

ColumnFilter in row mode and type date not trigger change when value change #13672

PierreB40 opened this issue Sep 14, 2023 · 8 comments · Fixed by #13674
Labels
LTS-PORTABLE Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@PierreB40
Copy link

PierreB40 commented Sep 14, 2023

Describe the bug

Using p-columnFilter in row mode and date type
Select a value in the calendar

Environment

x

Reproducer

https://codesandbox.io/s/primeng-table-filter-row-date-59jwcy

Angular version

16.2.1

PrimeNG version

16.3.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

18.17.1

Browser(s)

No response

Steps to reproduce the behavior

In the reproduction link, the filter in the first column (date) is a date filter.
Selecting a new filter value does not trigger a change, nor does pressing enter. A matchMode must be chosen to trigger a change.

Expected behavior

A change when the value is modified or when enter is pressed, as with other filters in row mode.

@PierreB40 PierreB40 added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Sep 14, 2023
@ashikjs
Copy link
Contributor

ashikjs commented Sep 14, 2023

@PierreB40 , but i can not see any date property in this object and you did not define any date property in globalfilter value.

@PierreB40
Copy link
Author

This is not related to the data, but to the behavior of the filter.
I've changed the data to avoid confusion

@ashikjs
Copy link
Contributor

ashikjs commented Sep 14, 2023

Thanks @PierreB40 , now i got it.

ashikjs added a commit to ashikjs/primeng that referenced this issue Sep 14, 2023
@ashikjs
Copy link
Contributor

ashikjs commented Sep 14, 2023

@PierreB40 can you check my PR, this issue solved on this PR

@PierreB40
Copy link
Author

Your solution corrects the action of selecting a date in the calendar
But when the date is entered using the keyboard, the event is triggered each time the keyboard is entered 😕

@ashikjs
Copy link
Contributor

ashikjs commented Sep 14, 2023

@PierreB40 I understand your point but it's not free text box it's a calendar, when you type any date in input box if it match with colander format then automatically it filter, event you don't need to press enter.

you can check video to understand the behavior more details.

https://www.awesomescreenshot.com/video/20777390?key=48435726b29035f62f5d75e729b81c38

@PierreB40
Copy link
Author

@ashikjs I know what you mean, the problem is that the calendar doesn't wait for a good format to trigger ngModelChange, so in lazy loading every keyboard entry triggers onLazyLoad

@ashikjs
Copy link
Contributor

ashikjs commented Sep 17, 2023

@PierreB40 here ngModelChange only tiger when calendar value change not user on type. If it was firing event on every key press then I will not provided this solution.

ashikjs added a commit to ashikjs/primeng that referenced this issue Sep 27, 2023
ashikjs added a commit to ashikjs/primeng that referenced this issue Sep 27, 2023
ashikjs added a commit to ashikjs/primeng that referenced this issue Sep 27, 2023
@cetincakiroglu cetincakiroglu added this to the 16.9.0 milestone Nov 22, 2023
@cetincakiroglu cetincakiroglu added Type: Bug Issue contains a bug related to a specific component. Something about the component is not working and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Nov 22, 2023
cetincakiroglu added a commit that referenced this issue Nov 22, 2023
…er-date-type-not-work

fix: #13672 || ColumnFilter in row mode and type date not trigger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTS-PORTABLE Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants