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

When using Locales, z* shows the tool tip "Contains" in CompoundInputFilter #468

Closed
thisisyazhini opened this issue May 21, 2020 · 3 comments · Fixed by #469
Closed

When using Locales, z* shows the tool tip "Contains" in CompoundInputFilter #468

thisisyazhini opened this issue May 21, 2020 · 3 comments · Fixed by #469

Comments

@thisisyazhini
Copy link

I'm submitting a Bug report

Your Environment

Software Version(s)
Angular 8.2.14
Angular-Slickgrid 2.16.5
TypeScript 3.5.3

Describe the Bug

On hovering over a CompoundInputFilter, the z* select option shows the tooltip incorrectly.

Steps to Reproduce

Do not use the TranslateService, so it defaults to use the locale constants.
For a string field, CompoundInputFilter will now show z* tooltip to be Contains
eg: filter: {
model: Filters.compoundInputText
}

Expected Behavior

For a CompoundInputFilter of String type, the z* description should be set to Ends with

Current Behavior

For a CompoundInputFilter of String type, the z* description shows Contains in that

Possible Solution

https://github.com/ghiscoding/Angular-Slickgrid/blob/master/src/app/modules/angular-slickgrid/filters/compoundInputFilter.ts#L179

In the above line, getOptionValues() is returning "ends with" description incorrectly, It should be as follows :
{ operator: '*z' as OperatorString, description: this.translate && this.translate.currentLang && this.translate.instant && this.translate.instant(`${translationPrefix}ENDS_WITH`) || this._locales && this._locales.TEXT_ENDS_WITH}

Code Sample

@ghiscoding
Copy link
Owner

Do you mean that it shows the text from the this._locales.TEXT_CONTAINS which is "Contains". Is that what you mean? That was a mistake, it should be this._locales.TEXT_ENDS_WITH

@thisisyazhini
Copy link
Author

Yes, that's what i meant. Thanks !

ghiscoding added a commit that referenced this issue May 26, 2020
)

Co-authored-by: Ghislain Beaulac <ghislain.beaulac@se.com>
@ghiscoding
Copy link
Owner

This is now fixed in latest version 2.18.x.

Please upvote ⭐ if you haven't already.
Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants