/picklist-buttons

LWC, picklist, buttons

Primary LanguageJavaScriptCreative Commons Zero v1.0 UniversalCC0-1.0

A LWC picklist buttons component that works with any picklist field

This component provides an alternative to the standard built-in Path feature.
It's interesting to use it for picklist that hold alternate values rather than values that reflect a progression of stages.

The component runs entirely on the Lightning Data Service and requires no Apex.

Install

If you are on MacOS or Linux, run

sh install.dev

Otherwise, type the following commands:

  1. Create a scratch org and provide it with an alias (path in the command below):
sfdx force:org:create -s -f config/project-scratch-def.json -a pl-buttons
  1. Push the app to your scratch org:
sfdx force:source:push
  1. Open the scratch org:
sfdx force:org:open

Configuration

  1. Edit a record page with the Lighning App Builder
  2. Place the Picklist Buttons component on the page.
  3. Set the Qualified Field Name parameter to one of the object picklist field. The field name must be qualified (eg: Account.Rating or Dummy__c.Stage__c).

Lightning App Builder configuration



Component at runtime