{"id":24765684,"url":"https://github.com/jsmithdev/extenda-picklist","last_synced_at":"2025-10-26T19:09:34.901Z","repository":{"id":199857675,"uuid":"680997821","full_name":"jsmithdev/extenda-picklist","owner":"jsmithdev","description":"Picklist/Drop down lwc with dynamic options, misc","archived":false,"fork":false,"pushed_at":"2023-10-12T07:49:44.000Z","size":12,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-28T23:15:11.699Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsmithdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-08-21T03:29:21.000Z","updated_at":"2023-08-21T04:01:44.000Z","dependencies_parsed_at":"2023-10-13T00:42:16.515Z","dependency_job_id":null,"html_url":"https://github.com/jsmithdev/extenda-picklist","commit_stats":null,"previous_names":["jsmithdev/extenda-picklist"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsmithdev%2Fextenda-picklist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsmithdev%2Fextenda-picklist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsmithdev%2Fextenda-picklist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsmithdev%2Fextenda-picklist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsmithdev","download_url":"https://codeload.github.com/jsmithdev/extenda-picklist/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245137116,"owners_count":20566701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-28T23:15:20.120Z","updated_at":"2025-10-26T19:09:34.770Z","avatar_url":"https://github.com/jsmithdev.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# extenda-picklist\n\n\u003e During the merge of extenda-picklist and dynamic picklist, use the [dynamic picklist](https://github.com/jsmithdev/dynamic-picklist) for getting picklist options dynamically or this commit for [extenda-picklist](https://github.com/jsmithdev/extenda-picklist/tree/1d80a408e83a79ff9c8a0c8a4a6f6afc6dd9285e) for using with other extenda elements\n\nAn LWC dynamic picklist that:\n\n- Adds ability to set the options dynamically based on the object, field, and record type.\n\n\u003cimg src=\"https://i.imgur.com/255cS5Z.png\" width=\"350px;\"\u003e\n\n## Attributes\n\n| Name | Type | Description |\n| --- | --- | --- |\n| `label` | `String` | The label of the picklist |\n| `value` | `String` | The value of the selected option |\n| `placeholder` | `String` | The placeholder of the picklist |\n| `recordTypeId` | `String` | The RecordType.Id to use in options import |\n| `fieldApiName` | `String` | The Field to use in options import |\n| `objectApiName` | `String` | The sObject to use in options import |\n| `options-override` | `List` | The list of options to display (instead of dynamically) |\n\n## Usage\n\n```html\n\u003cc-extenda-picklist\n    name=\"StageName\"\n    \n    label=\"StageName\"\n    placeholder=\"StageName\"\n\n    object-api-name=\"Opportunity\"\n    field-api-name=\"StageName\"\n    record-type-id={recordTypeId}\n\n    onchange={handleChange}\n\u003e\u003c/c-extenda-picklist\u003e\n```\n\nSee the [demo](/force-app/main/default/lwc/dynamicPicklistDemo/) for more details which works well in SFDX Local Development Server 👍\n\n### RecordType Id\n\nAs seen above, this takes a record-type-id. \n\nHowever, we can easily get a record type id in a parent component to give to this without Apex: \n\n```js\nimport { getObjectInfo } from 'lightning/uiObjectInfoApi';\nimport Opportunity from '@salesforce/schema/Opportunity'; \n\nexport default class ParentExample extends LightningElement {\n\t\n    recordTypeId;\n\n    @wire (getObjectInfo, { objectApiName: Opportunity })\n    _setField({ data, error }) {\n        this.recordTypeId = data?.defaultRecordTypeId;\n    }\n}\n```\n\nThis way it's more effecient on projects that use multiple picklists by making that call only once\n\n\u003e In the middle of merging extenda-picklist and dynamic picklist; for the moment use the [dynamic picklist](/force-app/main/default/lwc/dynamicPicklist/) for getting picklist options dynamically or [extenda-picklist](/force-app/main/default/lwc/extendaPicklist/) for using with other extenda elements\n\n## Deploy\n\n```bash\nsfdx force:source:deploy -p force-app/main/default/lwc/dynamicPicklist\n```\n\n📌  Above deploys to the default org set; Add `-u user@domain.com` or `-u alias` to deploy else where\n\n---\n\nCoded with ❤️ by [Jamie Smith](https://jsmith.dev)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsmithdev%2Fextenda-picklist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsmithdev%2Fextenda-picklist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsmithdev%2Fextenda-picklist/lists"}