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

Fix select all logic in v-field-list-item component #20315

Merged
merged 2 commits into from
Nov 6, 2023
Merged

Fix select all logic in v-field-list-item component #20315

merged 2 commits into from
Nov 6, 2023

Conversation

azrikahar
Copy link
Contributor

Scope

What's changed:

  • When we are adding fields one by one, we are emitting field.key as seen here:

    @click="$emit('add', [field.key])"

    which is accurate and doesn't include groups in it (but still includes related collection if it's a related collection field).

    Hence this PR replaces the original select all logic to re-use field.key of the children rather than re-constructing it manually.

Before

Currently when we add a field one by one, the fields are added as intended. However when we use the Select All button, fields within groups are being added as if it's a related collection field:

chrome_2PWIs0SXx3.mp4

After

chrome_NgRLR2dg5t.mp4

Potential Risks / Drawbacks

  • It should only affect the original bugged select all button, so there shouldn't be any risk of affecting the existing adding-one-by-one workflow.

Fixes #19567

@azrikahar azrikahar requested review from a team and rijkvanzanten and removed request for a team November 3, 2023 10:05
Copy link

changeset-bot bot commented Nov 3, 2023

🦋 Changeset detected

Latest commit: 2354f0d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@directus/app Patch
@directus/api Patch
directus Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@paescuj paescuj left a comment

Choose a reason for hiding this comment

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

🫶🏾

@paescuj paescuj merged commit 4e92196 into main Nov 6, 2023
6 checks passed
@paescuj paescuj deleted the fix/19567 branch November 6, 2023 12:18
@github-actions github-actions bot added this to the Next Patch Release milestone Nov 6, 2023
br-rafaelbarros pushed a commit to personal-forks/directus-source that referenced this pull request Nov 7, 2023
bvolz added a commit to bvolz/directus that referenced this pull request Nov 9, 2023
* main: (165 commits)
  Fix search height
  Don't try linting yaml files (directus#20366)
  All incoming code is through PRs
  Only run CI against files that changed (directus#20365)
  Show package version if available (directus#20303)
  Allow overriding asset presets (directus#20305)
  Refactor variables (directus#20329)
  Prevent re-installation of deps in Docker image (directus#20346)
  Use the collection icon in the DrawerItem (directus#20354)
  Preserve minimal app permissions/validations when merging (directus#20347)
  rename to `articles` to match other examples (directus#20359)
  Delete files based on "filename_disk" (directus#20341)
  SDK translation schema update (directus#20344)
  Update assign-next-release-milestone.yml
  Fix disabled input's border color (directus#20340)
  Fix select all logic in v-field-list-item component (directus#20315)
  Allow overriding the form elements on the public page (directus#20326)
  Use server store for public theme information (directus#20324)
  Updated Public Page Artwork (directus#20309)
  Updated all docs examples from "@directus/sdk/rest" to "@directus/sdk" (directus#20321)
  ...

# Conflicts:
#	app/src/lang/translations/de-DE.yaml
#	app/src/lang/translations/en-US.yaml
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data is not exported completely
2 participants