MCPcopy Create free account
hub / github.com/adobe/react-spectrum / getColumn

Function getColumn

packages/react-aria-components/test/Table.test.js:2388–2396  ·  view source on GitHub ↗
(tree, name)

Source from the content-addressed store, hash-verified

2386 describe('column resizing', () => {
2387 // I'd use tree.getByRole(role, {name: text}) here, but it's unbearably slow.
2388 function getColumn(tree, name) {
2389 // Find by text, then go up to the element with the cell role.
2390 let el = tree.getByText(name);
2391 while (el && !/columnheader/.test(el.getAttribute('role'))) {
2392 el = el.parentElement;
2393 }
2394
2395 return el;
2396 }
2397
2398 function resizeCol(tree, col, delta) {
2399 act(() => {

Callers 1

resizeColFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected