Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Is it possible to implement selection functionality in widgets?
I found solution by myself.
That is how it should be look like
<div class="selectable" ng-class="{'selected':row.dimensions[0].selected}" qva-activate="row.dimensions[0].select()">
I found solution by myself.
That is how it should be look like
<div class="selectable" ng-class="{'selected':row.dimensions[0].selected}" qva-activate="row.dimensions[0].select()">
Great that you have found it. Just a minor comment:
Use ng-click instead of qva-activate, since ng-click is the official method of AngularJS.
Regards
Stefan
Can anyone spot the mistake I've done?
I'm trying to achieve a simple select.
The cell I select, turns green, but the selection is never passed to the model.
WIDGET:
<table border="1">
<tbody>
<tr>
<td ng-repeat="row in data.rows">
<div class="selectable" ng-class="{'selected':row.dimensions[0].selected}" ng-click="row.dimensions[0].select($event)">
{{row.dimensions[0].qText}}
</div>
</td>
</tr>
</tbody>
</table>
CSS:
.selected {
background: green;
}
Did you check the browser console for errors?
No errors or logging in the console. (In Chrome DevTools, at least.)
Thanks for sharing this.
I've made a widget to select data, and as soon as the selection is made (validated), the widget disappears.
If I delete the selection from the top bar, the widget is back. How to change this behavior ?
Thanks,
Hi Jerome,
Have you checked the errors in browser console?
I did. There is no error