thien-do / moai

A React component library, where buttons look like buttons🗿
https://moai.thien.do
127 stars 26 forks source link

Warning when using setValue prop of Input component #244

Closed lqt93 closed 3 years ago

lqt93 commented 3 years ago

setValue is accidentally passed as raw property into native component in Moai Input component. It caused the warning by React:

Screen Shot 2021-06-30 at 15 30 53

I take a look in the code, and recognize that the root cause maybe due to these lines: https://github.com/moaijs/moai/blob/a384b2cd78661e598e69826b658d8dea4e32156f/lib/core/src/input/input.tsx#L126 https://github.com/moaijs/moai/blob/a384b2cd78661e598e69826b658d8dea4e32156f/lib/core/src/input/input.tsx#L131