You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Got stucked recently while trying to use 'eui-filter' on radio buttons. Trying to directly use the same approach as for checkboxes seemed to be a waste of time. It just can't find filters scope, I have found later, that radio's init a new scope in angular, but using '$parent.' scope seems to have no use too.
I found some workaround as follows:
In html:
<!--Init lte and gte parts of filter --><diveui-filter="ejs.RangeFilter('date').lte(time.lte)" ng-model="filter.enabled" eui-enabled="true"/><diveui-filter="ejs.RangeFilter('date').gte(time.gte)" ng-model="filter.enabled" eui-enabled="true"/><!--Radio buttons form--><form><inputname='range_toggle' type="radio" value="now-6h/h" ng-model="time.gte"><b>Last 6 hours</b></input></br><inputname='range_toggle' type="radio" value="now-12h/h" ng-model="time.gte"><b>Last 12 hours</b></input></br></form>
And in js:
$scope.time={lte:'now',gte:'now-6h/h'}
But I'm new to AngularJS, and I have feeling that there should be better solution using built-in ElasticUI directives.
Anyway, maybe my solution would help someone not to waste 3 hours of their precious time ;)
The text was updated successfully, but these errors were encountered:
Hi! Got stucked recently while trying to use 'eui-filter' on radio buttons. Trying to directly use the same approach as for checkboxes seemed to be a waste of time. It just can't find filters scope, I have found later, that radio's init a new scope in angular, but using '$parent.' scope seems to have no use too.
I found some workaround as follows:
In html:
And in js:
But I'm new to AngularJS, and I have feeling that there should be better solution using built-in ElasticUI directives.
Anyway, maybe my solution would help someone not to waste 3 hours of their precious time ;)
The text was updated successfully, but these errors were encountered: