Open digital-flowers opened 8 years ago
from react documentation React.PropTypes.node: Anything that can be rendered: numbers, strings, elements or an array (or fragment) containing these types.
React.PropTypes.node
this gives more flexibility to render custom html for each element for example
var searchTemplate = function(option){ return <div><img src={option.image} /><span>{option.name}</span></div> } <TypeAhead options={searchData} filterOption='title' displayOption={searchTemplate} placeholder="Search.." maxVisible={6}/>
from react documentation
React.PropTypes.node
: Anything that can be rendered: numbers, strings, elements or an array (or fragment) containing these types.this gives more flexibility to render custom html for each element for example