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

Function getColumn

packages/react-aria/test/table/ariaTableResizing.test.tsx:28–36  ·  view source on GitHub ↗
(tree, name)

Source from the content-addressed store, hash-verified

26
27// I'd use tree.getByRole(role, {name: text}) here, but it's unbearably slow.
28function getColumn(tree, name) {
29 // Find by text, then go up to the element with the cell role.
30 let el = tree.getByText(name);
31 while (el && !/columnheader/.test(el.getAttribute('role'))) {
32 el = el.parentElement;
33 }
34
35 return el;
36}
37
38function resizeCol(tree, col, delta) {
39 act(() => {

Callers 1

resizeColFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected