ant-design/components/auto-complete
jayberg 4acadc47b5 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.
2017-09-27 20:09:04 +08:00
..
__tests__ Revert "Mock rc-trigger" 2017-09-15 16:42:25 +08:00
demo Fix Input className to wrapper, close #6809 2017-07-12 21:43:06 +08:00
style add unit px to all less value, make them explicit 2017-07-17 17:44:40 +10:00
index.en-US.md docs: typo 2017-09-01 11:35:30 +08:00
index.tsx Avoid circular reference with infinite children (#7742) 2017-09-27 20:09:04 +08:00
index.zh-CN.md docs: typo 2017-09-01 11:35:30 +08:00
InputElement.tsx fix: should support child.ref in AutoComplete, close: #6814 (#7237) 2017-08-17 13:09:18 +08:00