Closed kmishmael closed 1 week ago
Thank you for your PR, that's a really nice addition to the loader 🚀!
I went over your code and updated it slightly (mostly documentation and some warnings). In addition I
You can find the updated code in
I also published the changes in v0.5.0-custom-id-rc.1
, so you can easily try it out for yourself. Just let me know if it works correctly or if it still needs some refinement.
Closing this since it's included in #14
This PR implements a feature request outlined in issue #13, introducing support for a custom unique identifier (
slug
) to replace the default Pocketbase ID. This allows for enhanced flexibility by enabling the use of other fields as unique identifiers tailored to specific use cases, including usage with thegetEntry
function.The proposal introduces a new optional configuration parameter,
id
, which serves as the unique identifier key for collection entries. Ifid
is not specified, it defaults toentry.id
.Documentation has also been updated to reflect these changes.
Example Usage
closes #13