Skip to content

Populate with childParam does not work #48

@DeividasK

Description

@DeividasK

Hello again :) childParam feature does not work for me. Maybe I'm doing something wrong?

Data:

goals: {
  goalId1: {
    uid: 'userId'
  }
}
users: {
  userId: {
    displayName: 'John Smith'
  }
}

Code:

const populates = [
  { child: 'uid', root: 'users', childParam: 'displayName' }
]
@firebaseConnect(() => ([
  { path: 'goals', populates }
]))
@connect(({ firebase }) => ({
  allGoals: helpers.populatedDataToJS(firebase, 'goals', populates)
}))

Result:

goals: {
  goalId1: {
    uid: {
      displayName: 'John Smith'
    }
  }
}

Expected:

goals: {
  goalId1: {
    uid: 'John Smith'
  }
}

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions