coda-js icon indicating copy to clipboard operation
coda-js copied to clipboard

Getting the row ID after inserting an item to the row

Open fdwilogo opened this issue 1 year ago • 2 comments

Hi,

Is there a way to get the row ID after inserting an item to the row?

All i get back after inserting a row is just a mutate request id

as per the Coda's documentation, it's possible.

fdwilogo avatar Jun 11 '24 21:06 fdwilogo

Thanks for creating your first issue for coda-js and contributing!

github-actions[bot] avatar Jun 11 '24 21:06 github-actions[bot]

You are right that it is now possible! The API must have been updated in the last couple of years to allow this.

Are you up for creating a PR to return both values instead of just the pending update?

parker-codes avatar Jun 13 '24 15:06 parker-codes

I've got this fixed on a fork that I can turn into a PR at any time. It's a trivial change.

I'm not able to run the Jest tests as they appear to be tied to a specific Coda API token. Maybe you've run into this before? Any suggestions?

jschlight avatar Aug 19 '24 22:08 jschlight

I've got this fixed on a fork that I can turn into a PR at any time. It's a trivial change.

I'm not able to run the Jest tests as they appear to be tied to a specific Coda API token. Maybe you've run into this before? Any suggestions?

Yeah, I should have done a better job with those tests so let's ignore them for now. If you create the PR I can better visualize what changed to know what type of semver bump it is and we'll go from there. Thank you. 🙂

parker-crabnebula avatar Aug 20 '24 16:08 parker-crabnebula

Whoops, commented with my work account, haha.

parker-codes avatar Aug 20 '24 16:08 parker-codes

As you can see the PR has been merged, but the GitHub Actions workflow is having issues. I'll try a few more things and then I may need to publish locally.

parker-codes avatar Aug 21 '24 15:08 parker-codes

Finally got it all working - let me know if you have any issues with version 4.1.2!

parker-codes avatar Aug 21 '24 16:08 parker-codes

Thanks @jschlight for the PR. :)

parker-codes avatar Aug 21 '24 16:08 parker-codes

I'm happy to have been able to contribute. The published package 4.1.2 appears to be working correctly.

jschlight avatar Aug 21 '24 20:08 jschlight