Open tmc opened 8 years ago
Interesting, that's highly likely a limitation of react-docgen
which we can't really work around. Maybe switching to recon will fix this?
/cc @chrisui, ref #293
Being in an environment in which I'm generating propTypes from an IDL this is a pretty important limitation.
Okay, let's wait for @chrisui to be back from holiday (soon?) and then we'll look into this! :+1:
Would be an interesting contribution to https://github.com/reactjs/react-docgen
@fkling I'm curious about your thoughts on how easy/hard this would be. I would be happy to dig in and submit a PR.
Potentially the same issue as https://github.com/reactjs/react-docgen/issues/65 . Variables should be resolved. I guess one would just have to add a resolveToValue
call here: https://github.com/reactjs/react-docgen/blob/master/src/handlers/propTypeHandler.js#L47
@fkling cool, thx for the hint. I will look into it later this week and create a PR 😊
@fkling / @nikgraf that does appear to fix this, FWIW
givent
the a1 field is renders to 'No Control available' while a2 appropriately renders the expected form.