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

Method constructor

packages/@react-aria/test-utils/src/tree.ts:36–49  ·  view source on GitHub ↗
(opts: TreeTesterOpts)

Source from the content-addressed store, hash-verified

34 private _tree: HTMLElement;
35
36 constructor(opts: TreeTesterOpts) {
37 let {root, user, interactionType, advanceTimer, direction} = opts;
38 this.user = user;
39 this._interactionType = interactionType || 'mouse';
40 this._advanceTimer = advanceTimer;
41 this._direction = direction || 'ltr';
42 this._tree = root;
43 if (root.getAttribute('role') !== 'treegrid') {
44 let tree = within(root).queryByRole('treegrid');
45 if (tree) {
46 this._tree = tree;
47 }
48 }
49 }
50
51 /**
52 * Set the interaction type used by the tree tester.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected