Skip to content

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

@phpgeekfr

Description

@phpgeekfr

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 });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions