[EuiInMemoryTable] Migrate from class to function component
- Dominant language
- TypeScript
- Stars
- 6.4k
- Forks
- 911
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 65
Description
`EuiInMemoryTable` extends `EuiBasicTable` with client-side sorting, pagination, and search. Highlighted as widely used.
- **File:** `components/basic_table/in_memory_table.tsx`
- **Class size:** 295 lines
- **State:** `prevProps`, `search`, `query`, `pageIndex`, `pageSize`, `pageSizeOptions`, `sortName`, `sortDirection`, `allowNeutralSort`, `showPerPageOptions`
- **Lifecycle:** `getDerivedStateFromProps`
**Migration notes:**
10+ state fields with `getDerivedStateFromProps` syncing pagination/sort from props. Should be migrated after `EuiBasicTable`. The derived state pattern is extensive and needs careful conversion.
**Acceptance criteria:**
- [ ] Convert to function component with hooks
- [ ] Migrate after `EuiBasicTable`
- [ ] Handle `getDerivedStateFromProps` → state sync for all 10+ fields
- [ ] All existing tests pass
Contributor guide
Assessment
This issue has not been assessed yet.