Skip to content

Conversation

@MonikaKirkova
Copy link
Contributor

Closes #14086

Additional information (check all that apply):

  • Bug fix
  • New functionality
  • Documentation
  • Demos
  • CI/CD

Checklist:

  • All relevant tags have been applied to this PR
  • This PR includes unit tests covering all the new code (test guidelines)
  • This PR includes API docs for newly added methods/properties (api docs guidelines)
  • This PR includes feature/README.MD updates for the feature docs
  • This PR includes general feature table updates in the root README.MD
  • This PR includes CHANGELOG.MD updates for newly added functionality
  • This PR contains breaking changes
  • This PR includes ng update migrations for the breaking changes (migrations guidelines)
  • This PR includes behavioral changes and the feature specification has been updated with them
[value]="value"
(input)="onInput($event)"
[type]="type"
type="text"
Copy link
Contributor

@gedinakova gedinakova Jul 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a really major change in the filtering UI which may cause other problems. The number input actually allows typing - & + signs, so the problem seems to be in the filtering logic itself. I believe the problem is in the IgxGridFilteringRowComponent's "onInput event handler. When the target's value is just "-" (or + actually) it is resolved as NaN, hence the behavior you are observing. I suggest we account for this specific scenario by adding something similar to:
public onInput(eventArgs) {
.....
const target = eventArgs.target;
if (!target.value && this.column.dataType === GridColumnDataType.Number) {
return;
}
if (this.column.dataType === GridColumnDataType.DateTime) {
....

@gedinakova gedinakova self-requested a review July 19, 2024 09:20
return;
}
} else {
if (val === '') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this if eliminate the need of the newly added check in onInput?

@ChronosSF
Copy link
Member

Closing this as it will duplicate with the mass merges.

@ChronosSF ChronosSF closed this Jul 23, 2024
@ChronosSF ChronosSF deleted the mkirkova/fix-14086-master branch July 23, 2024 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants