Constructor
new IngredientDetails(props)
Initializes state and binds methods
Parameters:
Name | Type | Description |
---|---|---|
props |
Array.<any> | Should contain an ingredientId, an order callback method, a delete callback method, and parental update and change methods. |
Extends
- React.Component
Methods
componentDidUpdate(prevProps)
Component update callback. Checks for ingredient ID changes
and refreshes the ingredient details
Parameters:
Name | Type | Description |
---|---|---|
prevProps |
Array.<any> |
deleteIngredient()
Button click callback for deletion. Updates self and parent.
render()
Renders out a fullscreen pannel with all the ingredient details.
Contains functionality to delete, update, and order ingredients.
updateRefresh()
Refreshes current details for new changes.
Used as a button callback