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

[P2][Sourcing] Duplicate children rows are being created even when there are no children present in the fdp-table while using the keyboard action. #11903

Open
Sayandeep-123 opened this issue May 11, 2024 · 4 comments

Comments

@Sayandeep-123
Copy link

Is this a bug, enhancement, or feature request?

Bug

Describe your proposal.

If there are no children items, then the duplicate children should not be created while expanding particular row with Enter/Space key.

Can you handle that on the application side

No

Which versions of Angular and Fundamental Library for Angular are affected? Please, specify the exact version. (If this is a feature request, use current version.)

Angular - 15
F-NGX - v0.43.34

If this is a bug, please provide steps for reproducing it; the exact components you are using;

Steps:

  1. Open stackblitz link
  2. Bring the focus to Laptops 0 (Level 1) and press Enter/Space key.
  3. Again bring the focus to Laptops 0 (Level 2) and press Enter/Space key.
  4. Again bring the focus to Laptops 0 (Level 3) and press Enter/Space key.

Observe the issue, even though it doesn't have children, it still get expanded.

NOTE: It is working fine with mouse click.

Please provide relevant source code (if applicable).

Please provide stackblitz example(s).

Stackblitz link - Click here

In case this is Accessibility related topic, did you consult with an accessibility expert? If not, please do so and share their recommendations.

Did you check the documentation and the API?

Yes

Did you search for similar issues?

No

Is there anything else we should know?

IMPORTANT: Please refrain from providing links or screenshots of SAP's internal information, as this project is open-source, and its contents are accessible to anyone.

@Sayandeep-123 Sayandeep-123 changed the title [Sourcing] Duplicate children rows are being created even when there are no children present in the fdp-table while using the keyboard action. [P2][Sourcing] Duplicate children rows are being created even when there are no children present in the fdp-table while using the keyboard action. May 13, 2024
@mikerodonnell89
Copy link
Member

I'm not sure why this is happening with keydown and not mouseclick, but I think this problem is really coming from the example code that generates children for all items. Is this problem something you're experiencing while developing a product with real-world data, or just something noticed from the documentation?

@sahanaN123
Copy link

@mikerodonnell89 : We are observing this issue even with real-world data.

@mikerodonnell89
Copy link
Member

@mikerodonnell89 : We are observing this issue even with real-world data.

Weird, if I make the generateItems function not generate new items beyond level 2, I don't see this problem

function generateItems(size = 5000, level = 0, startIndex = 0): ExampleItem[] {
  if (level < 3) {
    return new Array(size).fill(null).map(() => ({
      name: `Laptops ${startIndex++} (Level ${level + 1})`,
      description: 'pede malesuada',
      price: {
        value: 489.01,
        currency: 'EUR',
      },
      status: 'Out of stock',
      statusColor: 'negative',
      date: new FdDate(2020, 2, 5),
      verified: true,
      hasChildren: level < 2 ? true : false,
    }));
  } else {
    return [];
  }
}

But I think it would be good for us to not attempt a fetch when hasChildren is false

@sahanaN123
Copy link

This issue is now handled from application side. So the ticket could be closed. Thanks

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

No branches or pull requests

3 participants