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

Function optionsForSpecColumn

docs/app/js/sanddance-app.js:456–477  ·  view source on GitHub ↗
(sectionName, columns, role, disabledColumnName, selectedColumnName)

Source from the content-addressed store, hash-verified

454 }
455}
456function optionsForSpecColumn(sectionName, columns, role, disabledColumnName, selectedColumnName) {
457 const filtered = filterColumnList(role, columns);
458 const options = filtered.map((column)=>{
459 const option = {
460 key: `column:${column.name}`,
461 text: column.name,
462 data: column,
463 selected: selectedColumnName === column.name,
464 disabled: disabledColumnName === column.name
465 };
466 return option;
467 });
468 if (options.length) {
469 const option = {
470 key: sectionName,
471 text: sectionName,
472 itemType: (0, _base.base).fluentUI.DropdownMenuItemType.Header
473 };
474 options.unshift(option);
475 }
476 return options;
477}
478function optionsForReference(sectionName, specRoles) {
479 const options = specRoles.map((specRole)=>{
480 const option = {

Callers 1

getColumnMapOptionsFunction · 0.70

Calls 1

filterColumnListFunction · 0.70

Tested by

no test coverage detected