How to use the ra-core.addField function in ra-core

To help you get started, we’ve selected a few ra-core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github marmelab / react-admin / packages / ra-ui-materialui / src / input / LongTextInput.js View on Github external
/**
 * @deprecated use  instead
 */
export const LongTextInput = props => {
    console.warn(
        'The LongTextInput component is deprecated. You should instead use the TextInput component and set its multiline and fullWidth props to true.'
    );

    return ;
};

LongTextInput.defaultProps = {
    multiline: true,
};

const EnhancedLongTextInput = addField(LongTextInput);

EnhancedLongTextInput.defaultProps = {
    fullWidth: true,
};

export default EnhancedLongTextInput;
github bootstrap-styled / ra-ui / src / components / input / LongTextInput.js View on Github external
className: PropTypes.string,
  input: PropTypes.object,
  isRequired: PropTypes.bool,
  label: PropTypes.string,
  meta: PropTypes.object,
  name: PropTypes.string,
  options: PropTypes.object,
  resource: PropTypes.string,
  source: PropTypes.string,
  validate: PropTypes.oneOfType([
    PropTypes.func,
    PropTypes.arrayOf(PropTypes.func),
  ]),
};

const EnhancedLongTextInput = addField(LongTextInput);
EnhancedLongTextInput.defaultProps = {
  options: {},
};

export default EnhancedLongTextInput;
github bootstrap-styled / ra-ui / src / components / input / BooleanInput.js View on Github external
BooleanInput.propTypes = {
  className: PropTypes.string,
  id: PropTypes.string,
  input: PropTypes.object,
  isRequired: PropTypes.bool,
  label: PropTypes.string,
  resource: PropTypes.string,
  source: PropTypes.string,
  options: PropTypes.object,
};

BooleanInput.defaultProps = {
  options: {},
};

export default addField(BooleanInput);
github vascofg / react-admin-date-inputs / src / DateInput.js View on Github external
className: PropTypes.string,
};

DateInputComponent.defaultProps = {
  input: {},
  isRequired: 'false',
  label: '',
  meta: { touched: false, error: false },
  options: {},
  resource: '',
  source: '',
  labelTime: '',
  className: '',
};

export default addField(DateInputComponent);
github bootstrap-styled / ra-ui / src / components / input / NumberInput.js View on Github external
]),
};

NumberInput.defaultProps = {
  onBlur: () => {
  },
  onChange: () => {
  },
  onFocus: () => {
  },
  options: {},
  step: 'any',
  textAlign: 'right',
};

export const NumberInputWithField = addField(NumberInput);
NumberInputWithField.defaultProps = {
  textAlign: 'right',
};

export default NumberInputWithField;
github iamsimakov / ra-datetime-input / src / index.js View on Github external
classes: PropTypes.object,
  className: PropTypes.string,
  input: PropTypes.object,
  isRequired: PropTypes.bool,
  label: PropTypes.string,
  meta: PropTypes.object,
  options: PropTypes.object,
  resource: PropTypes.string,
  source: PropTypes.string,
};

DateTimeInput.defaultProps = {
  options: {},
};

export default addField(DateTimeInput);
github bootstrap-styled / ra-ui / src / components / input / DisabledInput.js View on Github external
);

DisabledInput.propTypes = {
  className: PropTypes.string,
  label: PropTypes.string,
  input: PropTypes.object,
  record: PropTypes.object,
  resource: PropTypes.string,
  source: PropTypes.string,
  labelHidden: PropTypes.bool,
  classNameInput: PropTypes.string,
  size: PropTypes.string,
};

export default addField(DisabledInput);
github vascofg / react-admin-date-inputs / src / index.js View on Github external
isRequired: 'false',
    meta: { touched: false, error: false },
    options: {},
    resource: '',
    source: '',
    labelTime: '',
    className: '',
    providerOptions: {
      utils: DateFnsUtils,
      locale: undefined,
    },
  };
  return _makePicker;
};

export const DateInput = addField(makePicker(DatePicker));
export const TimeInput = addField(makePicker(TimePicker));
export const DateTimeInput = addField(makePicker(DateTimePicker));
github FusionWorks / react-admin-google-maps / src / index.js View on Github external
markerPos: getPosition(e),
            })}
            onMarkerClick={e => this.deleteMarker({
              input,
              multipleMarkers,
              markerPos: getPosition(e),
            })}
            {...childrenProps}
          />
        
      
    );
  }
}

export const GMapInput = addField(GMap);
export const GMapField = ({ record, source, ...props }) => (
  
);
github maluramichael / ra-input-markdown / src / index.js View on Github external
render() {
    return (
      
        this.handleValueChange(value)}
          onTabChange={tab=>this.handleTabChange(tab)}
          value={this.state.value}
          generateMarkdownPreview={markdown => Promise.resolve(this.converter.makeHtml(markdown))}
          selectedTab={this.state.tab}/>
      
    );
  }
}

const MarkDownInputWithField = addField(withStyles(styles)(MarkdownInput));

MarkDownInputWithField.defaultProps = {
  addLabel: true,
  fullWidth: true,
};
export default MarkDownInputWithField;