当我单击组合框中的项目时,页面为空白。我会知道怎么了。这是代码:
import * as ReactWidgets from 'react-widgets';
import Combobox from 'react-widgets/lib/Combobox';
import moment from 'moment';
import momentLocaliser from 'react-widgets-moment-localizer';
import 'react-widgets/dist/css/react-widgets.css';
momentLocaliser(moment)
renderComboBox = ({ input, data, valueField, textField,placeholder, onSelect, meta: {touched, error,
warning}}) => {
let {Combobox} = ReactWidgets;
return(
<>
<Combobox {...input}
data={data}
placeholder={placeholder}
valueField={valueField}
value = {input.value || []}
textField={textField}
onChange={input.onChange}
onSelect={onSelect}
onBlur={() => input.onBlur()}
/>
{touched && ((error && <span className='form-field-error'>{error}</span>) || (warning &&
<span>{warning}</span>))}
</>
)
};
期望的输出是从组合框中选择的项目,但是输出是错误并且错误是:
未捕获的TypeError:nextValue.every不是函数