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

Function getMaxWidth

packages/react-stately/src/table/TableUtils.ts:50–55  ·  view source on GitHub ↗
(
  maxWidth: number | string | null | undefined,
  tableWidth: number
)

Source from the content-addressed store, hash-verified

48}
49
50export function getMaxWidth(
51 maxWidth: number | string | null | undefined,
52 tableWidth: number
53): number {
54 return maxWidth != null ? parseStaticWidth(maxWidth, tableWidth) : Number.MAX_SAFE_INTEGER;
55}
56
57// cannot support FR units, we'd need to know everything else in the table to do that
58export function getMinWidth(minWidth: number | string, tableWidth: number): number {

Callers 2

buildColumnWidthsMethod · 0.90
calculateColumnSizesFunction · 0.85

Calls 1

parseStaticWidthFunction · 0.85

Tested by

no test coverage detected