Skip to content

Commit d2c47d2

Browse files
committed
Removed public attr and method: customKey and getKey()
1 parent 712c022 commit d2c47d2

File tree

2 files changed

+14
-23
lines changed

2 files changed

+14
-23
lines changed

README.md

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -190,25 +190,23 @@ Here's how you can retrieve recent records and set them as default search result
190190
191191
### Attributes
192192
193-
| Attribute | Type | Description |
194-
| ------------------- | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
195-
| `label` | `String` | Optional lookup label. Label is hidden if attribute is omitted. |
196-
| `selection` | `[LookupSearchResult] OR LookupSearchResult` | Lookup initial selection if any. Array for multi-entry lookup or an Object for single entry lookup. |
197-
| `placeholder` | `String` | Lookup placeholder text |
198-
| `isMultiEntry` | `Boolean` | Whether the lookup is single (default) or multi entry. |
199-
| `required` | `Boolean` | Whether the lookup is a required field. Note: Property can be set with `<c-lookup required>`. |
200-
| `errors` | `[{ "id": String, "message": String }]` | List of errors that are displayed under the lookup. |
201-
| `scrollAfterNItems` | `Number` | A null or integer value used to force overflow scroll on the result listbox after N number of items. Valid values are null, 5, 7, or 10. Use null to disable overflow scrolling. |
202-
| `customKey` | `String` | _Deprecated_. Custom key that can be used to identify this lookup when placed in a collection of similar components. |
193+
| Attribute | Type | Description |
194+
| ------------------- | ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
195+
| `label` | `String` | Optional lookup label. Label is hidden if attribute is omitted. |
196+
| `selection` | `[LookupSearchResult]` OR `LookupSearchResult` | Lookup initial selection if any. Array for multi-entry lookup or an Object for single entry lookup. |
197+
| `placeholder` | `String` | Lookup placeholder text |
198+
| `isMultiEntry` | `Boolean` | Whether the lookup is single (default) or multi entry. |
199+
| `required` | `Boolean` | Whether the lookup is a required field. Note: Property can be set with `<c-lookup required>`. |
200+
| `errors` | `[{ "id": String, "message": String }]` | List of errors that are displayed under the lookup. |
201+
| `scrollAfterNItems` | `Number` | A null or integer value used to force overflow scroll on the result listbox after N number of items. Valid values are null, 5, 7, or 10. Use null to disable overflow scrolling. |
203202
204203
### Functions
205204
206-
| Function | Description |
207-
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
208-
| `setDefaultResults(results)` | Allows to set optional default items returned when search has no result (ex: recent items). `results` is an array of `LookupSearchResult`. |
209-
| `setSearchResults(results)` | Passes a search results array back to the lookup so that they are displayed in the dropdown where `results` is an array of `LookupSearchResult`. |
210-
| `getSelection()` | Gets the current lookup selection as an array of `LookupSearchResult`. |
211-
| `getkey()` | _Deprecated_. Retrieves the value of the `customKey` attribute. |
205+
| Function | Description |
206+
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
207+
| `setDefaultResults(results)` | Allows to set optional default items returned when search has no result (ex: recent items). `results` is an array of `LookupSearchResult`. |
208+
| `setSearchResults(results)` | Passes a search result array back to the lookup so that they are displayed in the dropdown. `results` is an array of `LookupSearchResult`. |
209+
| `getSelection()` | Gets the current lookup selection as an array of `LookupSearchResult`. |
212210
213211
### Events
214212

src/main/default/lwc/lookup/lookup.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ export default class Lookup extends LightningElement {
1414
@api isMultiEntry = false;
1515
@api errors = [];
1616
@api scrollAfterNItems;
17-
@api customKey;
1817

1918
// Template properties
2019
searchResultsLocalState = [];
@@ -95,12 +94,6 @@ export default class Lookup extends LightningElement {
9594
return this._curSelection;
9695
}
9796

98-
@api
99-
getkey() {
100-
console.warn('Lookup.getkey() is deprecated and will be removed in a future version.');
101-
return this.customKey;
102-
}
103-
10497
@api
10598
setDefaultResults(results) {
10699
this._defaultSearchResults = [...results];

0 commit comments

Comments
 (0)