Filtering a Freedom UI Data Grid by Clicking an Indicator Widget
Hi everyone,
I’m working on a Creatio Freedom UI list Page where I have several crt-indicator-widget components displaying different statuses/counts, for example:
Not Submit
Pending
Awaiting Approval
Approved
Rejected
I want to change the behavior when a user clicks an indicator widget.
I would like to:
1. Detect which indicator widget was clicked.
2. Get the widget's title/status dynamically.
3. Prevent the standard drill-down behavior.
4. Apply a corresponding filter to a Data Grid on the same Freedom UI page.
5. Refresh the grid so it displays only the records matching that widget/status.
For example:
Click "Not Submit" widget
↓
Filter Data Grid
↓
Status = "Not Submit"
The widgets are dynamically generated, so I don't want to hardcode each widget ID if possible.
I can successfully detect the widget click using JavaScript and display an alert with the widget title. However, Creatio's native indicator-widget drill-down action also executes, and I'm having difficulty replacing that behavior with my own grid-filtering logic.
Questions
What is the recommended Freedom UI approach for this?
Is there a supported request/event that can be used to handle an indicator widget click?
Can the native indicator-widget drill-down action be overridden?
How can I pass a filter to a Freedom UI Data Grid using crt.LoadDataRequest or another supported request?
Is there a way to dynamically identify the clicked widget and use its title/value to construct the filter?
Is there a better approach than manipulating the DOM with addEventListener?
Ideally, I would like to achieve:
Indicator Widget Click
↓
Get Widget Status
↓
Create/Apply Filter
↓
Reload Data Grid
Any examples using Creatio Freedom UI request handlers would be greatly appreciated.
Like
There is some info in this thread about overriding the widget click behaviour here, though it does rely on using the widget's ID to some extent: https://community.creatio.com/questions/disable-crtindicatorwidget-link-list
Not sure exactly how your widgets are being generated dynamically, but perhaps there would be some way of identifying the widget clicked & passing that into the handler described in that comment thread.