Skip to content
This repository was archived by the owner on Jun 1, 2025. It is now read-only.

Commit 475c82d

Browse files
authored
Merge pull request #812 from ghiscoding/bugfix/starts-ends-with-broken
fix(filters): startsWith/endsWith operator should work, fixes #811
2 parents 3dbfe5d + bf57acd commit 475c82d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/modules/angular-slickgrid/filter-conditions/stringFilterCondition.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ export function getFilterParsedText(inputSearchTerms: SearchTerm[] | undefined):
6565

6666
/** Execute the filter string test condition, returns a boolean */
6767
function testStringCondition(operator: OperatorType | OperatorString, cellValue: string, searchValue: string, searchInputLastChar?: string): boolean {
68-
if (operator === '*' || operator === OperatorType.endsWith) {
68+
if (operator === '*' || operator === OperatorType.endsWith || operator === '*z') {
6969
return cellValue.endsWith(searchValue);
70-
} else if ((operator === '' && searchInputLastChar === '*') || operator === OperatorType.startsWith) {
70+
} else if ((operator === '' && searchInputLastChar === '*') || operator === OperatorType.startsWith || operator === 'a*') {
7171
return cellValue.startsWith(searchValue);
7272
} else if (operator === '' || operator === OperatorType.contains) {
7373
return (cellValue.indexOf(searchValue) > -1);

0 commit comments

Comments
 (0)