display NaN values as undefined
Summary: NaN values now display a placeholder saying undefined. Reviewed By: emilsjolander Differential Revision: D7009509 fbshipit-source-id: a3af360cc5c9d93e95a9e10368270f053a9b2c08
This commit is contained in:
committed by
Facebook Github Bot
parent
7f99a547f5
commit
01ffe10c2f
@@ -35,6 +35,8 @@ export default (props: Props<*>) => {
|
||||
type="text"
|
||||
{...props}
|
||||
onChange={e => props.onChange(props.property, e.target.value)}
|
||||
placeholder="undefined"
|
||||
value={Number.isNaN(props.value) ? '' : props.value}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
@@ -149,11 +149,7 @@ export default class Playground extends Component<Props, State> {
|
||||
const updatedChildren = layoutDefinition
|
||||
.getIn(path)
|
||||
.push(LayoutRecord({width: 100, height: 100}));
|
||||
this.modifyAtPath(
|
||||
path,
|
||||
updatedChildren,
|
||||
selectedNodePath.concat(updatedChildren.size - 1),
|
||||
);
|
||||
this.modifyAtPath(path, updatedChildren);
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user