Skip to content

bygirish/react-native-multicomponent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-native-multicomponent

A <EwMultipleComponentValue> component for React Native to add and delete a component multiple times.

Installation

npm install multicomponent --save

Usage

<EwMultipleComponentValue
  component = { <Test /> }                  // Component to render multiple times
  componentStateArray = { testArray }       // Array containing state value of the component.
  isAddButtonVisible = { true }             // To show add button for component
  otherDetails = {{ testDetails: 'test' }}  // To pass custom details to the component
  isDeleteButtonVisible = { false }         // To show delete button for component
  onAddButtonPressed = { () => this.addCommentToServer() }  // To add custom functionality when add button is clicked
  updateParentState = { (componentState,componentKey) => this.updateParentState(componentState,componentKey) }  // To update parent state when component state is changed
  addLabel = "Add Component"     // Label for the add button
  showDeleteAlertbox = { true } // To show delete alertbox of component is deleted.
  alertboxData = {{ heading: 'Test', message: 'Do you want to delete this ?'  }} // To add custom heading and messaging if show alertbox is true
/>

Demo (Add button)

Demo (Delete button)

Contribution

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published