fix: suppress stale grid empty overlay (V13-FE-011)
This commit is contained in:
@@ -0,0 +1,20 @@
|
|||||||
|
WBS_ID: V13-FE-011
|
||||||
|
Date: 2026-08-09 (Asia/Seoul)
|
||||||
|
|
||||||
|
Source:
|
||||||
|
Browser inspection of /internal/ui-standard showed AG Grid's "No Rows To Show"
|
||||||
|
overlay while the T01 catalogue rows were visible.
|
||||||
|
|
||||||
|
Change:
|
||||||
|
AgGridAdapter suppresses the no-rows overlay whenever the supplied row collection is non-empty.
|
||||||
|
|
||||||
|
Commands and results:
|
||||||
|
- pnpm test -- --run src/shared/ui/adapter/primevue/tests/AgGridAdapter.spec.ts
|
||||||
|
Test Files 1 passed (1); Tests 2 passed (2); exit 0.
|
||||||
|
- pnpm typecheck
|
||||||
|
vue-tsc --noEmit; exit 0.
|
||||||
|
- Playwright open/snapshot http://127.0.0.1:5173/internal/ui-standard
|
||||||
|
T01 rows remained visible and the stale "No Rows To Show" text was absent.
|
||||||
|
|
||||||
|
Boundary:
|
||||||
|
This evidence covers the shared-grid overlay only. It does not claim full component-catalogue, visual-baseline, accessibility, or MVP-A acceptance.
|
||||||
@@ -55,6 +55,7 @@ function onRowClicked(event: RowClickedEvent): void {
|
|||||||
:column-defs="columnDefs"
|
:column-defs="columnDefs"
|
||||||
:row-selection="rowSelectionOptions"
|
:row-selection="rowSelectionOptions"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
|
:suppress-no-rows-overlay="rows.length > 0"
|
||||||
@row-clicked="onRowClicked"
|
@row-clicked="onRowClicked"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
import { mount } from '@vue/test-utils'
|
||||||
|
import { describe, expect, it } from 'vitest'
|
||||||
|
import AgGridAdapter from '../AgGridAdapter.vue'
|
||||||
|
|
||||||
|
const columns = [{ field: 'id', header: 'ID' }]
|
||||||
|
|
||||||
|
describe('AgGridAdapter', () => {
|
||||||
|
it('suppresses the stale empty overlay when rows are present', () => {
|
||||||
|
const wrapper = mount(AgGridAdapter, {
|
||||||
|
props: { rows: [{ id: 'T01' }], columns },
|
||||||
|
global: {
|
||||||
|
stubs: {
|
||||||
|
AgGridVue: {
|
||||||
|
props: ['suppressNoRowsOverlay'],
|
||||||
|
template: '<div data-test="grid" :data-suppress-no-rows-overlay="String(suppressNoRowsOverlay)" />'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
expect(wrapper.get('[data-test="grid"]').attributes('data-suppress-no-rows-overlay')).toBe('true')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('keeps the empty overlay available when there are no rows', () => {
|
||||||
|
const wrapper = mount(AgGridAdapter, {
|
||||||
|
props: { rows: [], columns },
|
||||||
|
global: {
|
||||||
|
stubs: {
|
||||||
|
AgGridVue: {
|
||||||
|
props: ['suppressNoRowsOverlay'],
|
||||||
|
template: '<div data-test="grid" :data-suppress-no-rows-overlay="String(suppressNoRowsOverlay)" />'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
expect(wrapper.get('[data-test="grid"]').attributes('data-suppress-no-rows-overlay')).toBe('false')
|
||||||
|
})
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user