complete:true is not working in loadOptions callback in 1.0.0-rc.2
See original GitHub issueI am returning loadoptions callback with complete: true still it will call loadoptions function again on typing in textbox
loadOptions(input, callback) {
const {AbInstance, filter } = this.props;
return getDataFromServer({ AbInstance, filter }).then((response) => {
callback(null, {
options: response,
complete: true
});
}, (error) => {
callback(error, null);
});
}
<Select.Async value={value} clearable={clearable} disabled={disabled} onChange={onChange} valueKey={valueKey} labelKey={labelKey} loadOptions={loadOptions} backspaceRemoves={backspaceRemoves} autoload={true} searchable={true} noResultsText={noResultsText} placeholder={selectPlaceholder} searchPromptText={searchPromptText} autofocus={autofocus} />
autoload is true so when select load first time it will call loadOptions function, and my loadOptions function taking all data from server and returning in callback with options and complete : true.
Still when ever i search in textbox it will calling loadOptions function again, i thing it should return data from cached result instead of calling loadOptions function again
Any idea, i am using 1.0.0-rc.2
Issue Analytics
- State:
- Created 7 years ago
- Reactions:17
- Comments:10 (1 by maintainers)
Top GitHub Comments
Still getting the same issues in v1.2.1
Not working for me either on 1.0.0-rc.3. Best to look at the source code and see if this is even still implemented. I can’t see any reference to it so far.