Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: about 2 months ago
JSON representation

Filter and search Custom Metadata with LWC

Awesome Lists containing this project

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 mdtId

handleMdtSelected (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.