MCPcopy Create free account
hub / github.com/callumalpass/tasknotes / createCardSelect

Function createCardSelect

src/settings/components/CardComponent.ts:699–718  ·  view source on GitHub ↗
(
	options: Array<{ value: string; label: string }>,
	selectedValue?: string
)

Source from the content-addressed store, hash-verified

697 * Creates a select dropdown with card styling
698 */
699export function createCardSelect(
700 options: Array<{ value: string; label: string }>,
701 selectedValue?: string
702): HTMLSelectElement {
703 const select = activeDocument.createElement("select");
704 select.addClass("tasknotes-settings__card-input");
705
706 options.forEach((option) => {
707 const optionEl = select.createEl("option", {
708 value: option.value,
709 text: option.label,
710 });
711
712 if (selectedValue === option.value) {
713 optionEl.selected = true;
714 }
715 });
716
717 return select;
718}
719
720/**
721 * Sets up drag and drop functionality for a draggable card

Callers 10

createFieldCardFunction · 0.90
renderRemindersListFunction · 0.90
renderSimplePropertyCardFunction · 0.90
createDefaultValueInputFunction · 0.90
renderUserFieldsListFunction · 0.90
renderStatusPropertyCardFunction · 0.90
renderStatusListFunction · 0.90

Calls 1

addClassMethod · 0.65

Tested by

no test coverage detected