Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Feb 2, 2025. It is now read-only.
Discussion options

For some reason can't get dt-options to initialize. Just keeps showing the default values.

component
export class WalletSubaddressComponent implements OnInit {
dtOptions: DataTables.Settings = {};
dtTrigger: Subject = new Subject();

ngOnInit() {
  this.dtOptions = {
  "pageLength": 5
};

html
table datatable [dtOptions]="dtOptions" [dtTrigger]="dtTrigger"
class="table is-striped mx-auto is-hoverable" id="subaddid"

You must be logged in to vote

Replies: 1 comment

Comment options

dtTrigger isn't triggered by your code to let the library its time to initialize.

Try this:

ngAfterViewInit() {
    this.dtTrigger.next();
  }

Take a look at the Rerender Table section of the documentation:

https://l-lin.github.io/angular-datatables/#/welcome

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
🙏
Q&A
Labels
None yet
2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.