-
-
Notifications
You must be signed in to change notification settings - Fork 119
feat(autocomplete): Editor & Filter autocomplete feature #101
Conversation
FilterArguments, | ||
FilterCallback, | ||
GridOption, | ||
MultipleSelectOption, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the MultipleSelectOption
is not required here
this.searchTerms = args.searchTerms || []; | ||
|
||
if (!this.grid || !this.columnDef || !this.columnFilter || (!this.columnFilter.collection && !this.columnFilter.collectionAsync && !this.columnFilter.filterOptions)) { | ||
throw new Error(`[Angular-SlickGrid] You need to pass a "collection" (or "collectionAsync") for the MultipleSelect Filter to work correctly. Also each option should include a value/label pair (or value/labelKey when using Locale). For example:: { filter: model: Filters.multipleSelect, collection: [{ value: true, label: 'True' }, { value: false, label: 'False'}] }`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the error message shouldn't include anything about MultipleSelect
this.labelName = this.customStructure && this.customStructure.label || 'label'; | ||
this.valueName = this.customStructure && this.customStructure.value || 'value'; | ||
|
||
// always render the Select (dropdown) DOM element, even if user passed a "collectionAsync", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove any reference to select dropdown
setValues(values: SearchTerm | SearchTerm[]) { | ||
if (values) { | ||
values = Array.isArray(values) ? values : [values]; | ||
this.$filterElm.multipleSelect('setSelects', values); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace the setValues()
with same code as the inputFilter
collection = getDescendantProperty(collection, this.collectionOptions.collectionInObjectProperty); | ||
} | ||
if (!Array.isArray(collection)) { | ||
throw new Error('Something went wrong while trying to pull the collection from the "collectionAsync" call in the Select Filter, the collection is not a valid array.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
again remove reference to Select Filter
List of things TODO
placeholder
to tell user what to doanimated GIF of the Feature
