-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Dev Tools UI: Bad readability of props of type function #17781
Comments
Can you share the code (not a picture of partial code, but actual runnable code) that reproduces the empty function names like |
class LabelsInput extends React.Component {
onCompletionClick = (completion) => {
console.log('HELLO')
}
onChange = (event) => {
console.log('HELLO')
}
onTokenRemove = (token) => {
console.log('HELLO')
}
onTokenCreationAndAdd = (completion, color) => {
console.log('HELLO')
}
onEditAll = () => {
console.log('>>> WOHOO onEdit');
}
render() {
const { query } = this.state;
const { placeholder, labels } = this.props;
const tokenName = 'Créer le tag';
const onEditAllText = 'Éditer les tags';
return (
<TokenInput
text={query}
tokens= {this.tokens}
completions={this.completions}
placeholder={placeholder}
onChange={this.onChange}
onAdd={this.onCompletionClick}
onRemove={this.onTokenRemove}
tokenName={tokenName}
handlesColor={true}
onTokenCreationAndAdd={this.onTokenCreationAndAdd}
onEditAll={this.onEditAll.bind(this)}
onEditAllText={onEditAllText}
/>
);
}
} |
More succinct, runnable repro: |
Fixed via #17789 Will go out with the next release, probably sometime this week BeforeAfter |
Wow very fast, thanks a lot @bvaughn |
Dev Tools evolved a lot the last months.
Last version doesn't display well functions in props, it leaves an empty field so hard to see if the prop is really passed and if there's really and function passes in the props of the component.
For example i dont' know if the prop
onChange
really exists as a prop of the componentTokenInput
.Don't know also which props are undefined.
Could be also great to use the propTypes to show the types of the props.
The text was updated successfully, but these errors were encountered: