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

Docs: Fix code issue in Interactive Panel Guide #22864

Merged
merged 4 commits into from
Jun 28, 2024

Conversation

PoHsun611
Copy link
Contributor

@PoHsun611 PoHsun611 commented Jun 27, 2024

Scope

const { useFieldsStore, usePermissionsStore } = useStores();
const fieldsStore = useFieldsStore();
const permissionsStore = usePermissionsStore();
const hasPermission = permissionsStore(props.collection, "create");

permissionsStore is not a function. Need to use permissionsStore.hasPermission

Potential Risks / Drawbacks

N/A

Review Notes / Questions

N/A

const { useFieldsStore, usePermissionsStore } = useStores();
const fieldsStore = useFieldsStore();
const permissionsStore = usePermissionsStore();
const hasPermission = permissionsStore(
  props.collection,
  "create"
);

'permissionsStore' is not a function. Need to use 'permissionsStore.permissionsStore'

This comment was marked as resolved.

@PoHsun611 PoHsun611 changed the title Update panels-create-items.md Document: Update panels-create-items.md Jun 27, 2024
@hanneskuettner
Copy link
Member

Nice catch! Do you mind adding your GitHub username to the contributors.yml, then we can proceed to merge this! Thank you!

@paescuj paescuj changed the title Document: Update panels-create-items.md Docs: Fix code issue in Interactive Panel Guide Jun 27, 2024
@rijkvanzanten rijkvanzanten enabled auto-merge (squash) June 27, 2024 14:58
auto-merge was automatically disabled June 28, 2024 02:44

Head branch was pushed to by a user without write access

@hanneskuettner hanneskuettner enabled auto-merge (squash) June 28, 2024 05:34
@hanneskuettner hanneskuettner merged commit 6a4413c into directus:main Jun 28, 2024
5 checks passed
@github-actions github-actions bot added this to the Next Release milestone Jun 28, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants