Filter behaviour and ma-data-point-selector
The filter behaviour in the Data Sources > Data Points list is excellent. Primarily, it is case insensitive and has an implied glob. I would like to suggest that it is applied to the data point details page's data point selector also.
I would also like to add this filter behaviour to my own pages that use ma-data-point-selector, any advice on how to go about this would be appreciated.
ma-data-point-selector is an great component and I really like using it in my own pages, could we please get some documentation? Up to now I've gone off guesses and page inspections.
@cbyrne there is their dashboard repo on git that you can use as a starting point.
Alternatively, I could likely get something together for you over the next week...
The Data Sources > Data Points just use angularJs $filter directive. You will not be able to override the ma-data-point-selector to behave the same as it already has its own filter in it. It just works differently. You need to be more precise with wild cards:
if you have a point name : foobarfoo and you want to filter by "bar" you would need to use
This was built to be able to produce "high resolution" filters to be able to bulk edit points or add to publishers.
For your custom dashboards I would suggest using the
<ma-filtering-point-list ng-model="maFilteringPointListModel" get-by-xid="true" ></ma-filtering-point-list>
I think it would be more suitable for dashboards as it has a more general filter and works the same as the data source -> datapoint details page. you can add custom queries, client side filtering on those quries, label ect and it has API docs and examples:
The <ma-datapoint-selector> does not have documentation yet but you can view its on https://github.com/MangoAutomation/ma-dashboards/tree/main/UI/web-src/ngMango/components/dataPointSelector
@CraigWeb Hi Craig, thanks for the info! My only issue with the filtering point list is that I want to allow the user to select multiple points. I would still suggest that the same filter from Data Sources > Data Points list is applied to all instances of data-point-selector. It might sound silly, but the concepts of wildcards and case sensitivity is a bit much for our end users.
Ye, I hear what you saying but the component was designed to enable highly accurate filters and we can't lose that. it's needed in the bulk editor and other pages. Maybe adding 2 different filter modes would be helpful to use in general dashboards.