# new Attribute Domain(props) → {React.Component}
Parameters:
Name | Type | Description |
---|---|---|
props |
Object | |
defaultValue |
Array | Array containing domain elements |
setDomainElements |
function | Method fired when adding, removing, editing the domain element or changing the order of domain elements. |
Methods
# static onClickAddElement(e)
Method runs if the domain element is added.
Parameters:
Name | Type | Description |
---|---|---|
e |
Object | Represents an event that takes place in DOM tree. |
# static onClickRemoveElement(e)
Method runs if the domain element is removed.
Parameters:
Name | Type | Description |
---|---|---|
e |
Object | Represents an event that takes place in DOM tree. |
# static renderElements()
Method prepares array of html elements which will be displayed through the render method. It is responsible for displaying all the domain elements (whole rows)
# static startTime(e)
Method responsible for starting event (after inserting character in the text field) after 300ms. This way it won't be lagging if many characters are quickly entered into the textfield.
Parameters:
Name | Type | Description |
---|---|---|
e |
Object | Represents an event that takes place in DOM tree. |
# static switchDownward(e)
Method runs if the order of domain elements changes (in this case arrow down has been clicked). Example: Let's say we have 4 elements: a,b,c,d If the down arrow is clicked on the "b" element order will look as follows: a,c,b,d. So the element below goes upper, and upper element goes below. (like in the switch) If the last element is clicked, i.e. "d" then the order will look as follows: d,a,b,c so the last element goes at the top (like in the queue) and rest of elements goes down.
Parameters:
Name | Type | Description |
---|---|---|
e |
Object | Represents an event that takes place in DOM tree. |
# static switchUpward(e)
Method runs if the order of domain elements changes (in this case arrow up has been clicked). Example: Let's say we have 4 elements: a,b,c,d If the up arrow is clicked on the "b" element order will look as follows: b,a,c,d. So the element below goes upper, and upper element goes below. (like in the switch) If the first element is clicked, i.e. "a" then the order will look as follows: b,c,d,a so the first element goes at the bottom (like in the queue) and rest of elements goes up.
Parameters:
Name | Type | Description |
---|---|---|
e |
Object | Represents an event that takes place in DOM tree. |
# static textFieldOnChange(e)
Method runs on change in the domain element.
Parameters:
Name | Type | Description |
---|---|---|
e |
Object | Represents an event that takes place in DOM tree. |