Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
ikomlyakov1929
Partner - Contributor III
Partner - Contributor III

selection in widgets

Is it possible to implement selection functionality in widgets?

1 Solution

Accepted Solutions
ikomlyakov1929
Partner - Contributor III
Partner - Contributor III
Author

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()">

View solution in original post

8 Replies
ikomlyakov1929
Partner - Contributor III
Partner - Contributor III
Author

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()">

Stefan_Walther
Employee
Employee

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

vegard_bakke
Partner - Creator III
Partner - Creator III

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;

}

ikomlyakov1929
Partner - Contributor III
Partner - Contributor III
Author

Did you check the browser console for errors?

vegard_bakke
Partner - Creator III
Partner - Creator III

No errors or logging in the console. (In Chrome DevTools, at least.)

Not applicable

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,

ikomlyakov1929
Partner - Contributor III
Partner - Contributor III
Author

Hi Jerome,

Have you checked the errors in browser console?

Not applicable

I did. There is no error