Constructor
# new Unions(props) → {React.Component}
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | |
objectGlobalName |
string | The global visible object name used by all tabs as reference. |
onTabChange |
function | Callback fired when a tab is changed and there are unsaved changes in this tab. |
project |
Object | Current project. |
serverBase |
string | The host and port in the URL of an API call. |
showAlert |
function | Callback fired when results in this tab are based on outdated information table. |
value |
number | The index of a selected tab. |
React.Component
Methods
# static getUnions()
Overview
Makes an API call on unions to receive current copy of unions from server. Then, updates state and makes necessary changes in display.# static onCountUnionsClick()
Overview
Makes an API call on unions to generate new unions from current information table with specified parameters. Then, updates state and makes necessary changes in display.# static onFilterChange(event)
Parameters:
Name | Type | Description |
---|---|---|
event |
Object | Represents an event that takes place in DOM. |
# componentDidMount()
Overview
A component's lifecycle method. Fired once when component was mounted.Goal
Method callsgetUnions
.
# componentDidUpdate(prevProps, prevState, snapshot)
Overview
A component's lifecycle method. Fired after a component was updated.Goal
If type of unions was changed tomonotonic
and consistency threshold is equal to 1,
method changes value of threshold to 0.
If project was changed, method saves changes from previous project and calls
getUnions
to receive the latest copy of unions.
Parameters:
Name | Type | Description |
---|---|---|
prevProps |
Object | Old props that were already replaced. |
prevState |
Object | Old state that was already replaced. |
snapshot |
Object | Returned from another lifecycle method |