mirror of
https://github.com/strapi/strapi.git
synced 2025-09-02 13:23:12 +00:00
Add refs to inputs Date Select & Select
This commit is contained in:
parent
4155de3cfc
commit
2ece502650
@ -47,6 +47,7 @@ function InputDate(props) {
|
||||
value: moment,
|
||||
}})}
|
||||
onFocus={props.onFocus}
|
||||
ref={props.inputRef}
|
||||
tabIndex={props.tabIndex}
|
||||
timeFormat='HH:mm:ss'
|
||||
utc={true}
|
||||
@ -64,6 +65,7 @@ InputDate.defaultProps = {
|
||||
deactivateErrorHighlight: false,
|
||||
disabled: false,
|
||||
error: false,
|
||||
inputRef: () => {},
|
||||
onBlur: () => {},
|
||||
onFocus: () => {},
|
||||
placeholder: 'app.utils.placeholder.defaultMessage',
|
||||
@ -77,6 +79,7 @@ InputDate.propTypes = {
|
||||
deactivateErrorHighlight: PropTypes.bool,
|
||||
disabled: PropTypes.bool,
|
||||
error: PropTypes.bool,
|
||||
inputRef: PropTypes.func,
|
||||
name: PropTypes.string.isRequired,
|
||||
onBlur: PropTypes.func,
|
||||
onChange: PropTypes.func.isRequired,
|
||||
|
@ -26,6 +26,7 @@ function InputNumber(props) {
|
||||
onChange={props.onChange}
|
||||
onFocus={props.onFocus}
|
||||
placeholder={message}
|
||||
ref={props.inputRef}
|
||||
style={props.style}
|
||||
tabIndex={props.tabIndex}
|
||||
type="number"
|
||||
@ -42,6 +43,7 @@ InputNumber.defaultProps = {
|
||||
deactivateErrorHighlight: false,
|
||||
disabled: false,
|
||||
error: false,
|
||||
inputRef: () => {},
|
||||
onBlur: () => {},
|
||||
onFocus: () => {},
|
||||
placeholder: 'app.utils.placeholder.defaultMessage',
|
||||
@ -55,6 +57,7 @@ InputNumber.propTypes = {
|
||||
deactivateErrorHighlight: PropTypes.bool,
|
||||
disabled: PropTypes.bool,
|
||||
error: PropTypes.bool,
|
||||
inputRef: PropTypes.func,
|
||||
name: PropTypes.string.isRequired,
|
||||
onBlur: PropTypes.func,
|
||||
onChange: PropTypes.func.isRequired,
|
||||
|
@ -32,6 +32,7 @@ function InputSelect(props) {
|
||||
onBlur={props.onBlur}
|
||||
onChange={props.onChange}
|
||||
onFocus={props.onFocus}
|
||||
ref={props.inputRef}
|
||||
style={props.style}
|
||||
tabIndex={props.tabIndex}
|
||||
value={props.value}
|
||||
@ -53,6 +54,7 @@ InputSelect.defaultProps = {
|
||||
deactivateErrorHighlight: false,
|
||||
disabled: false,
|
||||
error: false,
|
||||
inputRef: () => {},
|
||||
onBlur: () => {},
|
||||
onFocus: () => {},
|
||||
style: {},
|
||||
@ -65,6 +67,7 @@ InputSelect.propTypes = {
|
||||
deactivateErrorHighlight: PropTypes.bool,
|
||||
disabled: PropTypes.bool,
|
||||
error: PropTypes.bool,
|
||||
inputRef: PropTypes.func,
|
||||
name: PropTypes.string.isRequired,
|
||||
onBlur: PropTypes.func,
|
||||
onChange: PropTypes.func.isRequired,
|
||||
|
@ -28,6 +28,7 @@ function InputText(props) {
|
||||
onChange={props.onChange}
|
||||
onFocus={props.onFocus}
|
||||
placeholder={message}
|
||||
ref={props.inputRef}
|
||||
style={props.style}
|
||||
tabIndex={props.tabIndex}
|
||||
type="text"
|
||||
@ -44,6 +45,7 @@ InputText.defaultProps = {
|
||||
deactivateErrorHighlight: false,
|
||||
disabled: false,
|
||||
error: false,
|
||||
inputRef: () => {},
|
||||
onBlur: () => {},
|
||||
onFocus: () => {},
|
||||
placeholder: 'app.utils.placeholder.defaultMessage',
|
||||
@ -57,6 +59,7 @@ InputText.propTypes = {
|
||||
deactivateErrorHighlight: PropTypes.bool,
|
||||
disabled: PropTypes.bool,
|
||||
error: PropTypes.bool,
|
||||
inputRef: PropTypes.func,
|
||||
name: PropTypes.string.isRequired,
|
||||
onBlur: PropTypes.func,
|
||||
onChange: PropTypes.func.isRequired,
|
||||
|
@ -37,6 +37,7 @@ class InputWithAutofocus extends React.Component {
|
||||
|
||||
return (
|
||||
<Input
|
||||
inputRef={input => this.inputEl = input}
|
||||
name={name}
|
||||
onChange={onChange}
|
||||
selectOptions={['true', 'false']}
|
||||
|
Loading…
x
Reference in New Issue
Block a user