Bug Report
- Package version(s): 5.29.0
Priorities and help requested (not applicable if asking question):
Are you willing to submit a PR to fix? Yes
Requested priority: High
Describe the issue:
Using the createGenericItem on the TagPicker, the typing calls for it to return a ISuggestionModel, doing so results in the new "tag"/item to have the structure of a ISuggestionModel<T> instead of T
The issue stems from BasePicker._onValidateInput() calls this.props.createGenericItem, which is expected to return a ISuggestionModel<T> (but it has been typed as any... )
It then proceeds to call suggestionStore.createGenericSuggestion with the item returned from the callback.
In the Suggestions controller, the item passed is "converted" into a ISuggestionModel<T>
making the structrue as such:
ISuggestionModel<T> {
item: ISuggestinModel<T> {
item: T;
selected: boolean;
}
}
Actual behavior:
creating a generic item, adds a ISuggestionModel<ISuggestionModel<T>> instead of an item<T> in the items list of the picker.
Expected behavior:
creating a generic item, adds a an item<T> in the items list of the picker.
Bug Report
Priorities and help requested (not applicable if asking question):
Are you willing to submit a PR to fix? Yes
Requested priority: High
Describe the issue:
Using the createGenericItem on the TagPicker, the typing calls for it to return a ISuggestionModel, doing so results in the new "tag"/item to have the structure of a
ISuggestionModel<T>instead ofTThe issue stems from BasePicker._onValidateInput() calls this.props.createGenericItem, which is expected to return a
ISuggestionModel<T>(but it has been typed as any... )It then proceeds to call suggestionStore.createGenericSuggestion with the item returned from the callback.
In the Suggestions controller, the item passed is "converted" into a
ISuggestionModel<T>making the structrue as such:
Actual behavior:
creating a generic item, adds a
ISuggestionModel<ISuggestionModel<T>>instead of anitem<T>in the items list of the picker.Expected behavior:
creating a generic item, adds a an
item<T>in the items list of the picker.