Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/justin-lyon/lwc-metadata-picker
Filter and search Custom Metadata with LWC
https://github.com/justin-lyon/lwc-metadata-picker
Last synced: 2 months ago
JSON representation
Filter and search Custom Metadata with LWC
- Host: GitHub
- URL: https://github.com/justin-lyon/lwc-metadata-picker
- Owner: justin-lyon
- Created: 2019-10-14T15:31:11.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-14T19:19:21.000Z (about 5 years ago)
- Last Synced: 2024-08-02T12:21:27.771Z (5 months ago)
- Language: JavaScript
- Size: 107 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-lwc - lwc-metadata-picker - lyon](https://github.com/justin-lyon)) (On Platform Community Repos)
README
# lwc-metadata-picker
A Custom Metadata Lookup field that allows to filter by a picklist.
## Demo
![demo gif](lwc-metadata-picker.gif)
## Usage
```html
Dragons
Custom Metadata Id: {mdtId}
```
```javascript
// Parent.js
import { LightningElement, track } from 'lwc'export default class WipContainer extends LightningElement {
@track mdtIdhandleMdtSelected (event) {
this.mdtId = event.detail
}
}
```## API Documentation
**Name**|**Type**|**Description**
-----|-----|-----
combo-label|@api prop|Label for the Filter Combobox
picker-label|@api prop|Label for the Search Input
icon-name|@api prop|Icon for records and results
placeholder|@api prop|Placeholder text for the Search Input
mdt-name|@api prop|Custom Metadata API Name
title|@api prop|Custom Metadata Field displayed in Search Results Title
subtitle|@api prop|Custom Metadata Field display in Search Results Subtitle
filter-by|@api prop|Custom Metadata Field to Filter by, defaults to subtitle
onselected|event|Fired when a Metadata Record is selected. event.detail is the metadata record id.