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

Function getColumn

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

Source from the content-addressed store, hash-verified

2084 describe('column resizing', () => {
2085 // I'd use tree.getByRole(role, {name: text}) here, but it's unbearably slow.
2086 function getColumn(tree, name) {
2087 // Find by text, then go up to the element with the cell role.
2088 let el = tree.getByText(name);
2089 while (el && !/columnheader/.test(el.getAttribute('role'))) {
2090 el = el.parentElement;
2091 }
2092
2093 return el;
2094 }
2095
2096 function resizeCol(tree, col, delta) {
2097 act(() => {

Callers 1

resizeColFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected