Structure Table
This component contains the structure definition used for the structure matching. The structure definitions consists of entries and structure links between them
Relations to other components
Props
Name |
Type |
Description |
headerColumns |
Header [] |
Contains the table headers. |
structureEntries |
StructureEntry [] |
Contains the entries in the table. |
wildcards |
Wildcard [] |
Keeps track of all wildcards used in the structure definition. |
isRemovingStructureEntries |
boolean |
Keeps track of whether the user is removing StructureEntry from the structure definition. |
onToggleStructureLink |
function |
Reference to a function of the StructureDialog that handles the change of a StructureLinkDistance between two entries in the table. |
onStructureEntryRemoved |
function |
Reference to a function of the StructureDialog that handles the removal of a StructureEntry from the structure definition. |
onToggleIsCellSelected |
function |
Reference to a function of the StructureDialog that handles (un)selecting cells of a StructureEntry . |
State
Name |
Type |
Default |
Description |
columnWidth |
[id: string]: number |
LOG_COLUMN_WIDTH_LOOKUP |
Keeps track of the width of the table columns. |
Functions
Component lifecycle functions
-
constructor(...)
- Params:
- Description: initializes the
columnWidth
in state.
- Returns: -
-
shouldComponentUpdate(...)
- Params:
nextProps: Readonly<Props>
nextState: Readonly<State>
_nextContext: any
- Description: Checks whether there is a change in any of the props. If so, it returns
true
and the component is re-rendered. Otherwise it returns false
.
- Returns:
boolean
-
render()
- Description: renders the table by calling the
renderHeader
and renderRows
functions.
- Returns: div of type
JSX.Element
-
setColumnWidth()
- Params:
name: string
width: number
- Description: renders the
structureEntries
as rows of the table.
- Returns: div of type
JSX.Element
containing the structure entries in the structure definition.
-
columnWidth(...)
- Params:
- Description: gets the
columnWidth
of a column from the state based on the parameter, if the name is not present it uses the LOG_DEFAULT_COLUMN_WIDTH
(const)
- Returns:
number
-
- Params:
- Description: renders the table header.
- Returns: div of the type
JSX.Element
containing all the cells in the table header.
-
renderHeaderColumn()
- Params:
value: string
columnIndex: number
width: number
- Description: renders a single cell of the table headers.
- Returns:
ReactResizeDetector
containing a div with a Header
-
renderColumn(...)
- Params:
rowIndex: number
cellIndex: number
width: number
- Description: renders one
cellContents
(i.e., a single cell) of a StructureEntry row
based on the parameters.
- Returns: div of type
JSX.Element
containing the cell of a structureEntry.row
-
renderRows(...)
- Params:
containerWidth: number
containerHeight: number
- Description: renders the
structureEntries
as rows of the table.
- Returns: div of type
JSX.Element
containing the structure entries in the structure definition.