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

Fix for nested data objects when loading table with a promise #215

Merged
merged 1 commit into from
Feb 9, 2015

Conversation

dtychshenko
Copy link

As the title states, this is a fix for nested data objects when loading a table though a promise. Ex:

Options:

vm.dtOptions = DTOptionsBuilder.fromFnPromise(function() {
        return $resource('data-nested.json').get().$promise;
    }).withPaginationType('full_numbers')
      .withDataProp('data.inner');

data-nested.json:

{
    "data": {
        "inner": [
            {
                "id": 860,
                "firstName": "Superman",
                "lastName": "Yoda"
            }, {
                "id": 870,
                "firstName": "Foo",
                "lastName": "Whateveryournameis"
            }, {
                "id": 590,
                "firstName": "Toto",
                "lastName": "Titi"
            }
        ]
    }
}

@dtychshenko dtychshenko changed the title Fix for nested data objects when loading table with a promise #214 Fix for nested data objects when loading table with a promise Feb 9, 2015
l-lin added a commit that referenced this pull request Feb 9, 2015
Fix for nested data objects when loading table with a promise #215
@l-lin l-lin merged commit 6b23cd3 into l-lin:dev Feb 9, 2015
@l-lin
Copy link
Owner

l-lin commented Feb 9, 2015

Awesome 👍

@dtychshenko dtychshenko deleted the nested-data branch February 9, 2015 18:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants