How to use the mobx-react.propTypes.observableArray function in mobx-react

To help you get started, we’ve selected a few mobx-react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kwzm / react-mobx-react-router-boilerplate / src / routes / demo / routes / products / components / Filter / Filter.js View on Github external
)}
            
          
          
            <button style="{{">
              重置
            </button>
          
        
      
    )
  }
}

Filter.wrappedComponent.propTypes = {
  categories: ObservablePropTypes.observableArray.isRequired,
}

export default Form.create({
  mapPropsToFields: ({ data = {} }) =&gt; {
    return {
      name: { value: data.name },
      manufacturer: { value: data.manufacturer },
      productionDate: { value: data.productionDate ? moment(data.productionDate) : null },
      price: { value: data.price },
      category: { value: data.category },
    }
  },
})(Filter)