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

Function isStatic

packages/react-stately/src/table/TableUtils.ts:17–19  ·  view source on GitHub ↗
(width?: ColumnSize | null)

Source from the content-addressed store, hash-verified

15
16// numbers and percents are considered static. *fr units or a lack of units are considered dynamic.
17export function isStatic(width?: ColumnSize | null): boolean {
18 return width != null && (!isNaN(width as number) || String(width).match(/^(\d+)(?=%$)/) !== null);
19}
20
21export function parseFractionalUnit(width?: ColumnSize | null): number {
22 if (!width || typeof width === 'number') {

Callers 1

calculateColumnSizesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected