Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

onUpdate method of FireCollection/FireSubCollection should contain params in WriteOptions #30

Open
phpgeekfr opened this issue May 25, 2023 · 0 comments

Comments

@phpgeekfr
Copy link
Collaborator

phpgeekfr commented May 25, 2023

onUpdate method of FireCollection/FireSubCollection should contain params in WriteOptions.

so we can do

  onUpdate(object: any, { write, params }: WriteOptions) {
    const ref = doc(this.db, `collection/${params.parentId}/subcollection/${object.id}`);
  }

Possible resolution (not tested) :
https://github.com/dappsnation/ngfire/blob/master/libs/ngfire/firestore/src/collection.ts#LL426C15-L426C61
and
https://github.com/dappsnation/ngfire/blob/master/libs/ngfire/firestore/src/collection.ts#L447

await this.onUpdate(data, { write: tx, ctx, params: options.params });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant