Skip to content
This repository was archived by the owner on Feb 2, 2025. It is now read-only.

Conversation

@shanmukhateja
Copy link
Collaborator

  • Also updated docs and demo project

Getting this off the list before upgrade to v12

- update docs and demo project
@shanmukhateja shanmukhateja requested a review from l-lin May 13, 2021 09:51
Copy link
Owner

@l-lin l-lin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: I added the promise feature because there were cases where the dtOptions comes from the server. See https://l-lin.github.io/angular-datatables/#/advanced/load-dt-options-with-promise

@shanmukhateja shanmukhateja requested a review from l-lin May 13, 2021 13:55
Copy link
Owner

@l-lin l-lin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue: The basic example "angular-way" doesn't seem to work with this change.

suggestion: This is a breaking change. We should not forget to add this information when releasing the newest version. Maybe add this change only in version 12, as it's a major version?

shanmukhateja and others added 2 commits May 14, 2021 08:06
Co-authored-by: Louis LIN <l-lin@users.noreply.github.com>
Co-authored-by: Louis LIN <l-lin@users.noreply.github.com>
@shanmukhateja
Copy link
Collaborator Author

@l-lin thanks for the suggested changes. I've added them as requested.

And yes. I do not plan on backporting this PR to older versions. It will be a v12+ thing only.

We talked about this over email a few months ago, remember? I also remember attaching a git patch as POC for this.

I'm looking into angular way bug, will update when fixed.

Copy link
Owner

@l-lin l-lin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, my memory is quite bad.

const { ref, context } = el.ngTemplateRef;
// get <td> element which holds data using index
const columnIndex = columns.findIndex(e => e.data === el.data);
const cellFromIndex = row.childNodes.item(index);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const cellFromIndex = row.childNodes.item(index);
const cellFromIndex = row.childNodes.item(columnIndex);
@shanmukhateja
Copy link
Collaborator Author

Hey, I've realised this feature isn't going to work with how we setup datatables.net library.

I'm closing this for now with hope to revive it in the future, maybe Angular v13?

@shanmukhateja shanmukhateja deleted the dtinstance-no-promise branch July 11, 2021 05:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants