Commit c34b92b3 by Vladislav Lagunov

Добавлен тултип с ошибкой

parent a9f9f464
...@@ -173,7 +173,7 @@ export default class AutoComplete<A=string> extends React.Component<Props<A>, St ...@@ -173,7 +173,7 @@ export default class AutoComplete<A=string> extends React.Component<Props<A>, St
const { nonNull, disabled } = this.props; const { nonNull, disabled } = this.props;
return { return {
...pick(this.props, 'disabled', 'error', 'fullWidth', 'placeholder'), ...pick(this.props, 'disabled', 'error', 'fullWidth', 'placeholder', 'ctx'),
value: this.getValue(), value: this.getValue(),
onValueChange: disabled ? undefined : this.handleValueChange, onValueChange: disabled ? undefined : this.handleValueChange,
onChange: disabled ? undefined : this.handleChange, onChange: disabled ? undefined : this.handleChange,
......
...@@ -32,6 +32,8 @@ class BooleanField extends React.Component<Props> { ...@@ -32,6 +32,8 @@ class BooleanField extends React.Component<Props> {
checked={value} checked={value}
onChange={this.handleChange} onChange={this.handleChange}
disabled={disabled} disabled={disabled}
data-rh-at="right"
data-rh={typeof(error) === 'string' || typeof(error) === 'function' ? typeof(error) === 'string' ? error : error(ctx) : undefined}
/> />
</div>; </div>;
} }
......
...@@ -148,12 +148,11 @@ class MomentField extends React.Component<Props, State> { ...@@ -148,12 +148,11 @@ class MomentField extends React.Component<Props, State> {
} }
render() { render() {
const { classes, /*dirty, */ error, InputProps, onBlur, onChange, onFocus, value, format: formapProps, disabled, ...rest } = this.props; const { classes, ctx, error, InputProps, onBlur, onChange, onFocus, value, format: formapProps, disabled, ...rest } = this.props;
const { rootEl } = this; const { rootEl } = this;
const { open } = this.state; const { open } = this.state;
const rootClass = classes.root; const rootClass = classes.root;
return <F.Modifier proj={this.projectContext}> return <F.Modifier proj={this.projectContext}>
<div {...rest} className={rootClass} ref={this.handleRootRef}> <div {...rest} className={rootClass} ref={this.handleRootRef}>
<TextField <TextField
......
...@@ -104,6 +104,8 @@ export class TextField extends React.Component<Props, State> { ...@@ -104,6 +104,8 @@ export class TextField extends React.Component<Props, State> {
onFocus={onFocus} onFocus={onFocus}
onBlur={onBlur} onBlur={onBlur}
onKeyDown={onKeyDown} onKeyDown={onKeyDown}
data-rh-at="right"
data-rh={typeof(error) === 'string' || typeof(error) === 'function' ? typeof(error) === 'string' ? error : error(ctx) : undefined}
/> />
{endAdornment} {endAdornment}
</div>; </div>;
......
...@@ -34,7 +34,7 @@ export function withFieldContext<P extends FieldProps<any>, C extends React.Comp ...@@ -34,7 +34,7 @@ export function withFieldContext<P extends FieldProps<any>, C extends React.Comp
renderer = (context: FieldProps) => { renderer = (context: FieldProps) => {
// @ts-ignore // @ts-ignore
return React.createElement(Component, Object.assign({}, this.props, context)); return React.createElement(Component, { ...this.props, ...context });
}; };
} }
......
export default {
"ru-RU": {
"Fill out this field": "Заполните это поле",
},
"lt-LT": {
},
"de-DE": {
},
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment