0
I have an app with Angularjs using Material Design and Md.datatable. in the latest version of each Framework(respectively 1.6.4, 1.1.0 and 0.10.x). In the Md.datatable. it is possible to verify that there is a callback function when a table item is selected. However, when using this function in my scripts, it always happens that this function is never called only once. It is invoked when the table is loaded, when I select an item (which was only supposed to occur ONCE, but it triggers 150 simultaneous calls, which, for my code, should not happen), I tried to get around this problem and decided to ask for help. Below is a test I did with a console log.
Code
vm.onMainFlowSelected = (flow) => {console.log('executado');}
Print Scren
The screen has just uploaded and NOTHING is selected, however
Console
They were executed 80 times, only at page loading.
Just so there’s no doubt, here’s my directive on Angularjs
<tr
md-row md-select="flow"
md-select-id="flow.id"
md-auto-select
md-on-select="onSelectItem(flow)">