MCPcopy Index your code
hub / github.com/microsoft/SandDance / optionsForReference

Function optionsForReference

docs/app/js/sanddance-app.js:478–496  ·  view source on GitHub ↗
(sectionName, specRoles)

Source from the content-addressed store, hash-verified

476 return options;
477}
478function optionsForReference(sectionName, specRoles) {
479 const options = specRoles.map((specRole)=>{
480 const option = {
481 key: `role:${specRole.role}`,
482 text: aliasLabels[specRole.role],
483 data: specRole.role
484 };
485 return option;
486 }).sort((a, b)=>a.text.localeCompare(b.text));
487 if (options.length) {
488 const option = {
489 key: sectionName,
490 text: sectionName,
491 itemType: (0, _base.base).fluentUI.DropdownMenuItemType.Header
492 };
493 options.unshift(option);
494 }
495 return options;
496}
497function selectFirst(options) {
498 for(let i = 0; i < options.length; i++){
499 if (options[i].itemType === (0, _base.base).fluentUI.DropdownMenuItemType.Header) continue;

Callers 1

getColumnMapOptionsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected