@ng-select/ng-select 13.7.2 → 13.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -48
- package/esm2022/lib/config.service.mjs +1 -1
- package/esm2022/lib/ng-select.component.mjs +7 -4
- package/fesm2022/ng-select-ng-select.mjs +6 -3
- package/fesm2022/ng-select-ng-select.mjs.map +1 -1
- package/lib/config.service.d.ts +1 -0
- package/lib/ng-select.component.d.ts +2 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -195,54 +195,55 @@ map: {
|
|
|
195
195
|
|
|
196
196
|
## API
|
|
197
197
|
### Inputs
|
|
198
|
-
| Input
|
|
199
|
-
|
|
200
|
-
| [addTag]
|
|
201
|
-
| addTagText
|
|
202
|
-
| appearance
|
|
203
|
-
| appendTo
|
|
204
|
-
| bufferAmount
|
|
205
|
-
| bindValue
|
|
206
|
-
| bindLabel
|
|
207
|
-
| [closeOnSelect]
|
|
208
|
-
| clearAllText
|
|
209
|
-
| [clearable]
|
|
210
|
-
| [clearOnBackspace]
|
|
211
|
-
| [compareWith]
|
|
212
|
-
| dropdownPosition
|
|
213
|
-
| [
|
|
214
|
-
| [
|
|
215
|
-
| [
|
|
216
|
-
| [
|
|
217
|
-
| [
|
|
218
|
-
| [
|
|
219
|
-
|
|
|
220
|
-
|
|
|
221
|
-
|
|
|
222
|
-
| [
|
|
223
|
-
|
|
|
224
|
-
|
|
|
225
|
-
| [
|
|
226
|
-
|
|
|
227
|
-
|
|
|
228
|
-
|
|
|
229
|
-
| [
|
|
230
|
-
| [
|
|
231
|
-
| [
|
|
232
|
-
| [
|
|
233
|
-
| [
|
|
234
|
-
| [
|
|
235
|
-
| [
|
|
236
|
-
| [
|
|
237
|
-
| [
|
|
238
|
-
| [
|
|
239
|
-
| [
|
|
240
|
-
|
|
|
241
|
-
|
|
|
242
|
-
| [
|
|
243
|
-
| [
|
|
244
|
-
| [
|
|
245
|
-
| [
|
|
198
|
+
| Input | Type | Default | Required | Description |
|
|
199
|
+
|-----------------------------|------------------------------------------------------|---------------------| ------------- |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
200
|
+
| [addTag] | `boolean \| ((term: string) => any \| Promise<any>)` | `false` | no | Allows to create custom options. |
|
|
201
|
+
| addTagText | `string` | `Add item` | no | Set custom text when using tagging |
|
|
202
|
+
| appearance | `string` | `underline` | no | Allows to select dropdown appearance. Set to `outline` to add border instead of underline (applies only to Material theme) |
|
|
203
|
+
| appendTo | `string` | null | no | Append dropdown to body or any other element using css selector. For correct positioning `body` should have `position:relative` |
|
|
204
|
+
| bufferAmount | `string` | null | no | Append dropdown to body or any other element using css selector. For correct positioning `body` should have `position:relative` |
|
|
205
|
+
| bindValue | `string` | `-` | no | Object property to use for selected model. By default binds to whole object. |
|
|
206
|
+
| bindLabel | `string` | `label` | no | Object property to use for label. Default `label` |
|
|
207
|
+
| [closeOnSelect] | `boolean` | true | no | Whether to close the menu when a value is selected |
|
|
208
|
+
| clearAllText | `string` | `Clear all` | no | Set custom text for clear all icon title |
|
|
209
|
+
| [clearable] | `boolean` | `true` | no | Allow to clear selected value. Default `true` |
|
|
210
|
+
| [clearOnBackspace] | `boolean` | `true` | no | Clear selected values one by one when clicking backspace. Default `true` |
|
|
211
|
+
| [compareWith] | `(a: any, b: any) => boolean` | `(a, b) => a === b` | no | A function to compare the option values with the selected values. The first argument is a value from an option. The second is a value from the selection(model). A boolean should be returned. |
|
|
212
|
+
| dropdownPosition | `bottom` \| `top` \| `auto` | `auto` | no | Set the dropdown position on open |
|
|
213
|
+
| [fixedPlaceholder] | `boolean` | `false` | no | Set placeholder visible even when an item is selected |
|
|
214
|
+
| [groupBy] | `string` \| `Function` | null | no | Allow to group items by key or function expression |
|
|
215
|
+
| [groupValue] | `(groupKey: string, children: any[]) => Object` | - | no | Function expression to provide group value |
|
|
216
|
+
| [selectableGroup] | `boolean` | false | no | Allow to select group when groupBy is used |
|
|
217
|
+
| [selectableGroupAsModel] | `boolean` | true | no | Indicates whether to select all children or group itself |
|
|
218
|
+
| [items] | `Array<any>` | `[]` | yes | Items array |
|
|
219
|
+
| [loading] | `boolean` | `-` | no | You can set the loading state from the outside (e.g. async items loading) |
|
|
220
|
+
| loadingText | `string` | `Loading...` | no | Set custom text when for loading items |
|
|
221
|
+
| labelForId | `string` | `-` | no | Id to associate control with label. |
|
|
222
|
+
| [markFirst] | `boolean` | `true` | no | Marks first item as focused when opening/filtering. |
|
|
223
|
+
| [isOpen] | `boolean` | `-` | no | Allows manual control of dropdown opening and closing. `true` - won't close. `false` - won't open. |
|
|
224
|
+
| maxSelectedItems | `number` | none | no | When multiple = true, allows to set a limit number of selection. |
|
|
225
|
+
| [hideSelected] | `boolean` | `false` | no | Allows to hide selected items. |
|
|
226
|
+
| [multiple] | `boolean` | `false` | no | Allows to select multiple items. |
|
|
227
|
+
| notFoundText | `string` | `No items found` | no | Set custom text when filter returns empty result |
|
|
228
|
+
| placeholder | `string` | `-` | no | Placeholder text. |
|
|
229
|
+
| [searchable] | `boolean` | `true` | no | Allow to search for value. Default `true` |
|
|
230
|
+
| [readonly] | `boolean` | `false` | no | Set ng-select as readonly. Mostly used with reactive forms. |
|
|
231
|
+
| [searchFn] | `(term: string, item: any) => boolean` | `null` | no | Allow to filter by custom search function |
|
|
232
|
+
| [searchWhileComposing] | `boolean` | `true` | no | Whether items should be filtered while composition started |
|
|
233
|
+
| [trackByFn] | `(item: any) => any` | `null` | no | Provide custom trackBy function |
|
|
234
|
+
| [clearSearchOnAdd] | `boolean` | `true` | no | Clears search input when item is selected. Default `true`. Default `false` when **closeOnSelect** is `false` |
|
|
235
|
+
| [deselectOnClick] | `boolean` | `false` | no | Deselects a selected item when it is clicked in the dropdown. Default `false`. Default `true` when **multiple** is `true` |
|
|
236
|
+
| [editableSearchTerm] | `boolean` | `false` | no | Allow to edit search query if option selected. Default `false`. Works only if multiple is `false`. |
|
|
237
|
+
| [selectOnTab] | `boolean` | `false` | no | Select marked dropdown item using tab. Default `false` |
|
|
238
|
+
| [openOnEnter] | `boolean` | `true` | no | Open dropdown using enter. Default `true` |
|
|
239
|
+
| [typeahead] | `Subject` | `-` | no | Custom autocomplete or advanced filter. |
|
|
240
|
+
| [minTermLength] | `number` | `0` | no | Minimum term length to start a search. Should be used with `typeahead` |
|
|
241
|
+
| typeToSearchText | `string` | `Type to search` | no | Set custom text when using Typeahead |
|
|
242
|
+
| [virtualScroll] | `boolean` | false | no | Enable virtual scroll for better performance when rendering a lot of data |
|
|
243
|
+
| [inputAttrs] | `{ [key: string]: string }` | `-` | no | Pass custom attributes to underlying `input` element |
|
|
244
|
+
| [tabIndex] | `number` | `-` | no | Set tabindex on ng-select |
|
|
245
|
+
| [preventToggleOnRightClick] | `boolean` | `false` | no | Prevent opening of ng-select on right mouse click |
|
|
246
|
+
| [keyDownFn] | `($event: KeyboardEvent) => bool` | `true` | no | Provide custom keyDown function. Executed before default handler. Return false to suppress execution of default key down handlers |
|
|
246
247
|
|
|
247
248
|
### Outputs
|
|
248
249
|
|
|
@@ -18,4 +18,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.0", ngImpor
|
|
|
18
18
|
type: Injectable,
|
|
19
19
|
args: [{ providedIn: 'root' }]
|
|
20
20
|
}] });
|
|
21
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
21
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlnLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvbmctc2VsZWN0L2xpYi9jb25maWcuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQUczQyxNQUFNLE9BQU8sY0FBYztJQUQzQjtRQUlDLGlCQUFZLEdBQUcsZ0JBQWdCL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