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

Nested combobox groups disappear after selection #8727

Closed
2 of 6 tasks
tom7248 opened this issue Feb 12, 2024 · 4 comments
Closed
2 of 6 tasks

Nested combobox groups disappear after selection #8727

tom7248 opened this issue Feb 12, 2024 · 4 comments
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 5 A few days of work, definitely requires updates to tests. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive p - low Issue is non core or affecting less that 10% of people using the library

Comments

@tom7248
Copy link

tom7248 commented Feb 12, 2024

Check existing issues

Actual Behavior

If a calcite-combobox has two or more levels of calcite-combobox-item-groups that only contain other calcite-combobox-item-groups, and calcite-combobox-items at the bottom of the hierarchy, when one of those items is selected, the group hierarchy is removed from the combobox dropdown.

Expected Behavior

The combox content should not change with selection

Reproduction Sample

https://codepen.io/_t_o_m_/pen/LYagJmY

Reproduction Steps

  1. Click in the combox to display the dropdown
  2. Select "Item 1.1.1", the item in the group hierarchy with only groups
  3. Click in the combobox again to display the dropdown
  4. The group hierarchy that contains "Item 1.1.1" no longer displays

Reproduction Version

2.4.0

Relevant Info

No response

Regression?

No response

Priority impact

p4 - not time sensitive

Impact

No response

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-angular
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/eslint-plugin-calcite-components

Esri team

ArcGIS Field Apps

@tom7248 tom7248 added 0 - new New issues that need assignment. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. labels Feb 12, 2024
@github-actions github-actions bot added ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. calcite-components Issues specific to the @esri/calcite-components package. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive labels Feb 12, 2024
@jcfranco jcfranco added needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. estimate - 5 A few days of work, definitely requires updates to tests. p - low Issue is non core or affecting less that 10% of people using the library and removed needs triage Planning workflow - pending design/dev review. labels Feb 29, 2024
@geospatialem geospatialem removed the needs milestone Planning workflow - pending milestone assignment, has priority and/or estimate. label Apr 3, 2024
@bedzhist
Copy link

bedzhist commented Jun 2, 2024

I guess the bug is caused by this function (packages/calcite-components/src/components/combobox/utils.ts):

image

It should be updated to something like this:

export function getAncestors(element) {
  const ancestors = [];
  let currentElement = element.parentElement?.closest(ComboboxChildSelector);
  while (currentElement) {
    ancestors.push(currentElement);
    currentElement = parent.parentElement?.closest(ComboboxChildSelector);
  }
  return ancestors;
}

@jcfranco
Copy link
Member

The original issue was fixed by #7212 (see updated repro case).

@geospatialem geospatialem added this to the 2024-06-25 - Jun Release milestone Jun 24, 2024
@jcfranco jcfranco added 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 0 - new New issues that need assignment. labels Jun 24, 2024
Copy link
Contributor

Installed and assigned for verification.

@DitwanP
Copy link
Contributor

DitwanP commented Jun 24, 2024

🍡 Verified locally on dev

@DitwanP DitwanP closed this as completed Jun 24, 2024
@DitwanP DitwanP added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. ArcGIS Field Apps Issues logged by ArcGIS Field Apps team members. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. calcite-components Issues specific to the @esri/calcite-components package. estimate - 5 A few days of work, definitely requires updates to tests. impact - p3 - not time sensitive User set priority impact status of p3 - not time sensitive p - low Issue is non core or affecting less that 10% of people using the library
Projects
None yet
Development

No branches or pull requests

5 participants