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

[IgrGrid] Programmatic initial Filtering? #87

Open
mddifilippo89 opened this issue Sep 12, 2024 · 1 comment
Open

[IgrGrid] Programmatic initial Filtering? #87

mddifilippo89 opened this issue Sep 12, 2024 · 1 comment
Labels
🐛 bug Something isn't working

Comments

@mddifilippo89
Copy link
Collaborator

mddifilippo89 commented Sep 12, 2024

How do you filter programmatically?

filteringExpressionsTree assigned to the grid results in errors and incompatibility.

WC
eg.

https://codesandbox.io/p/sandbox/strange-tu-9d8dfl

How to get this working in React?
https://codesandbox.io/p/sandbox/vigilant-river-8vf3gl

const gridFilteringExpressionsTree = new IgrFilteringExpressionsTree(
FilteringLogic.And
);
const productFilteringExpressionsTree = new IgrFilteringExpressionsTree(
FilteringLogic.And,
"ProductName"
);
const productExpression = {
condition: IgrStringFilteringOperand.instance().condition("contains"),
fieldName: "ProductName",
ignoreCase: true,
searchVal: "c",
};
productFilteringExpressionsTree.filteringOperands.push(productExpression);
gridFilteringExpressionsTree.filteringOperands.push(
productFilteringExpressionsTree
);

      this.grid.filteringExpressionsTree = gridFilteringExpressionsTree;
@mddifilippo89 mddifilippo89 added the 🐛 bug Something isn't working label Sep 12, 2024
@mddifilippo89
Copy link
Collaborator Author

@dkamburov
Can you take a look at this? There is some discrepancy with IgrStringFilteringOperand.

Property 'instance' does not exist on type 'typeof IgrStringFilteringOperand'.typescript(2339)

Tried to add "new" but with no luck

const productExpression = {
condition: new IgrStringFilteringOperand()
.instance()
.condition("contains"),
fieldName: "ProductName",
ignoreCase: true,
searchVal: "c",
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant