Skip to content

Fix #630: Product registration does not list all child categories#889

Open
MIbrahimPro wants to merge 1 commit into
evershopcommerce:devfrom
MIbrahimPro:fix/630-category-tree-truncation
Open

Fix #630: Product registration does not list all child categories#889
MIbrahimPro wants to merge 1 commit into
evershopcommerce:devfrom
MIbrahimPro:fix/630-category-tree-truncation

Conversation

@MIbrahimPro

Copy link
Copy Markdown

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

When selecting a category in product registration (or when choosing a parent category in category edit), the admin category tree only shows a limited number of child categories per parent (capped by default collection size, e.g. 20). Parents with many children (e.g. 75) appear truncated: not all children are listed or selectable.

Issue Number: #630

What is the new behavior?

  • Backend: For categories GraphQL queries that use only a parent filter (and no explicit page/limit), default pagination is no longer applied. All children for that parent are returned, so the tree can show the full list (e.g. all 75 children).
  • Frontend: Category tree list items use stable React keys (categoryId instead of value) so rendering is consistent when many children are shown.
  • Tests: New integration test categoryCollectionPagination.test.js asserts that parent-only category queries are not paginated, and that explicit page/limit still apply when provided.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Fixes #630.
Manual check: expand a parent with many children in Admin → Products → New Product → Category, and in Admin → Category → Edit → Parent category; all children should appear.

@MIbrahimPro

Copy link
Copy Markdown
Author

Hi,
what is going on

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.

[BUG] The product registration does not list all child categories

1 participant