question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DtInstance empty in angular uib tabs

See original GitHub issue

- angular version: 1.5.8
- jquery version: 3.2,1
- datatables version: 1.10.16
- angular-datatables version 0.6.2:

In a table inside an uib tab:

<uib-tabset active="active">
     <uib-tab index="0" heading="Lavori da fare">
         <table width="100%"
                                           datatable=""
                                           dt-instance="dtInstance"
                                           dt-options="dtOptions"
                                           dt-columns="dtColumns"
                                           class="table table-striped table-bordered table-hover">
         <thead>
         </thead>
         </table>
</uib-tab>
</uib-tabset>

The dtInstance object is always empty… if the table is outside the tabset, all works ok.

Suggestion?

Thanks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
l-lincommented, Mar 25, 2018

What if you transform you dtInstance as a function instead?

$scope.dtInstance = function(dtInstance) {
  console.log(dtInstance);
}

I’m sorry, I don’t really know how where the issue is. It’s better if you reproduce your code in a plnkr or fiddlejs or something alike as I can debug over there.

0reactions
zenducommented, Jun 19, 2018

Using function for dtInstance solved problem for me. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scroller function of angular-datatables in md-tab
Finally, I have solution. The solution is very easy. As I have mentioned, the table showed data correctly in html code but it...
Read more >
UI Bootstrap - AngularUI
Original Bootstrap's CSS depends on empty href attributes to style cursors for several components (pagination, tabs etc.). But in AngularJS adding empty ......
Read more >
DataTables, AngularJS, and Django | Stacks & Q's
The key attribute here is datatable, which links the DOM element to angular-datatables module. As you can see, this element is quite empty....
Read more >
Routing in Angular JS using Angular UI Router
Angular -UI-Router is an AngularJS module used to create routes for ... After clicking on Login tab in the nav bar, Output will...
Read more >
AngularJS 1.4.x
dataTable.attr('id'); yadcf.init($scope.dt.instance. ... border-bottom: 0; padding: 0; white-space: nowrap; } .ui-tabs .ui-tabs-nav li a { float: left; ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found