fix(reorder-group): add children fallback for framework compatibility (#30593)

Issue number: resolves #30592

---------

## What is the current behavior?
Reorder group is failing for Angular, React & Vue due to the change from
`children` to `__children`.

## What is the new behavior?
- Fallback to `children` if `__children` is undefined.
- Adds an e2e test for Angular (depends on
https://github.com/ionic-team/ionic-framework/pull/30594)
- Tasks have been created to migrate and add e2e tests for the other
frameworks

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

## Other information

Dev build: `8.7.2-dev.11754087334.1815cf22`

---------

Co-authored-by: Brandy Smith <6577830+brandyscarney@users.noreply.github.com>
This commit is contained in:
Brandy Smith
2025-08-05 10:27:18 -04:00
committed by GitHub
parent 05026c5a48
commit 1cd81b9230
11 changed files with 218 additions and 3 deletions

View File

@@ -0,0 +1,25 @@
import { expect } from '@playwright/test';
import { test } from '@playwright/test';
import { dragElementBy } from '../../utils/drag-utils';
test.describe('reorder-group: angular standalone', () => {
test('should reorder the items', async ({ page }) => {
await page.goto('/standalone/reorder-group');
// Get initial order
const initialItems = await page.locator('ion-item').allTextContents();
expect(initialItems).toEqual(['Item 1', 'Item 2', 'Item 3']);
const reorderGroup = page.locator('ion-reorder-group');
// Drag the first item down to move it to the end (below Item 3)
await dragElementBy(reorderGroup.locator('ion-reorder').first(), page, 0, 300);
// Wait for the reorder to complete
await page.waitForTimeout(500);
// Verify the new order - Item 1 should now be at the end
const finalItems = await page.locator('ion-item').allTextContents();
expect(finalItems).toEqual(['Item 2', 'Item 3', 'Item 1']);
});
});