WeivData API Reference | ExWeiv Apps
    Preparing search index...

    Function update

    • Type Parameters

      Parameters

      • collectionId: string

        The ID of the collection that contains the item to update.

      • item: CItem

        The item to update.

      • Optionaloptions: WeivDataOptionsOwner

        An object containing options to use when processing this operation.

      Returns Promise<CItem>

      Fulfilled - The object that was updated. Rejected - The error that caused the rejection.

      Updates an item in a collection. !! IMPORTANT: In weiv-data you don't need to pass the al data. It's enough to just pass the updated values in your document. Anything that's not in the update object will be untouched and will stay how it was before. In wix-data if you don't pass a field in your document it will be overwritten as undefined. This doesn't apply to weiv-data. If you want this logic use replace function instead.