Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add useDirectusFields() composable #294

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

yoavf
Copy link

@yoavf yoavf commented Feb 18, 2025

This pull request introduces a new composable useDirectusFields, including a playground button and relevant documentation.

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

useDirectusFields exposes an important part of directus: collection fields.

Documentation updates:

Playground application updates:

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (if not applicable, please state why) - not applicable because there are no existing tests. I'm happy to add some, but a separate MR should introduce a test framework.

Copy link

vercel bot commented Feb 18, 2025

@yoavf is attempting to deploy a commit to the Conner's projects Team on Vercel.

A member of the Team first needs to authorize it.


const fetchFields = async () => {
try {
const fields = await getFields({
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a generic type here to the docs? Like in the playground usage.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Intevel done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants