-
-
Notifications
You must be signed in to change notification settings - Fork 303
support Object.keys
within oneOf
#153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Can you give a concrete example and the result you expect? We could certainly special case |
sure, this is what I'm doing: In an external file that is shared by a couple components:
In a component that accepts one of the statuses listed above:
I'm looking for the list |
|
ok, I'm using react-styleguidist which uses docgen. I'll see if I can figure out another method (or just write them by hand again) |
also, of note, I did just try and do this with an object in the same file and I still get this output. So while this might not ever work for an object from an external file it might still be nice for something within the same file. |
Yeah, that's what I meant when I said that we could special case |
ah, right, I have the memory of a goldfish. carry on! |
I would like this as well. Seems that variables should be evaluated before the docs get "scraped" from the file. |
+1 |
Related to #122 |
If props are imported from external file, values are still not displayed. |
any updates on this? Object.keys seems to work if the object is declared in the same file, but not when imported. Would this be fixed when #352 is merged ? |
I'd like to use
Object.keys
to generate the list of values possible foroneOf
but have found that this currently does not work. Has anyone run into this before? Not sure if this is a feature request or if there is a better way I could be writing my propType.The text was updated successfully, but these errors were encountered: