Avoid circular reference with infinite children (#7742)
Avoid circular reference with infinite children (#7742)

Because {element} is a child of <InputElement>, we get a circular reference when also adding "element.props" to <InputElement>, as <InputElement> will be cloned to <{element}> within InputElement.tsx. As a consequence, we get an infinitive circular loop of Element->Props->Children->Element->Props->Children->Element->Props->Children->…

React seems to detect and automatically fix this infinitive loop. But when using the smaller and faster Inferno as a replacement library of React, we get a "RangeError: Maximum call stack size exceeded".

This commit fixes this bug by not attaching {...element.props} to <InputElement>.

All tests did pass and I did not notice any changes in the behaviour of the AutoComplete component. But now, AutoComplete works also with Inferno and not only with React.
elevensky/ant-design,ant-design/ant-design,ant-design/ant-design,marswong/ant-design,elevensky/ant-design,vgeyi/ant-design,marswong/ant-design,zheeeng/ant-design,icaife/ant-design,icaife/ant-design,zheeeng/ant-design,RaoHai/ant-design,havefive/ant-design,zheeeng/ant-design,vgeyi/ant-design,RaoHai/ant-design,RaoHai/ant-design,elevensky/ant-design,zheeeng/ant-design,marswong/ant-design,vgeyi/ant-design,elevensky/ant-design,vgeyi/ant-design,havefive/ant-design,havefive/ant-design,ant-design/ant-design,icaife/ant-design,havefive/ant-design,RaoHai/ant-design,marswong/ant-design,ant-design/ant-design,icaife/ant-design