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

Method constructor

packages/@react-aria/test-utils/src/table.ts:53–67  ·  view source on GitHub ↗
(opts: TableTesterOpts)

Source from the content-addressed store, hash-verified

51 private _table: HTMLElement;
52
53 constructor(opts: TableTesterOpts) {
54 let {root, user, interactionType, advanceTimer, direction} = opts;
55 this.user = user;
56 this._interactionType = interactionType || 'mouse';
57 this._advanceTimer = advanceTimer;
58 this._direction = direction || 'ltr';
59 this._table = root;
60 let role = root.getAttribute('role');
61 if (role !== 'grid' && role !== 'treegrid') {
62 let table = within(root).queryByRole('grid') || within(root).queryByRole('treegrid');
63 if (table) {
64 this._table = table;
65 }
66 }
67 }
68
69 /**
70 * Set the interaction type used by the table tester.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected