tinyplex / tinybase

The reactive data store for local‑first apps.
https://tinybase.org
MIT License
3.39k stars 67 forks source link

Ability to assign rowId when adding a new row #43

Closed WonderPanda closed 1 year ago

WonderPanda commented 1 year ago

Forgive me if this is covered somewhere, but looking through the docs and playing around with examples using store.addRow() or useRowCallback() it doesn't seem like there is a way to provide our own ID and we must rely on receiving one that was assigned automatically by tinybase

Describe the solution you'd like It would be great if there was an optional way to add your own ID for a row.

jamesgpearce commented 1 year ago

store.setRow(yourIdHere, ...) // :)

WonderPanda commented 1 year ago

Ahhh, not sure how I missed that. Thank you!