Class: IngredientDetails

frontend~IngredientDetails(props)

A detailed view pannel for an ingredient. Future versions should instead extend a shared detailed component

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.
Source:

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>
Source:

deleteIngredient()

Button click callback for deletion. Updates self and parent.
Source:

render()

Renders out a fullscreen pannel with all the ingredient details. Contains functionality to delete, update, and order ingredients.
Source:

updateRefresh()

Refreshes current details for new changes. Used as a button callback
Source: