MCPcopy
hub / github.com/callumalpass/tasknotes / registerTextInput

Function registerTextInput

src/modals/taskModalUserFieldControls.ts:287–300  ·  view source on GitHub ↗
(
	context: TaskModalUserFieldContext,
	inputRefs: Map<string, HTMLInputElement>,
	field: UserMappedField,
	input: HTMLInputElement,
	options: { attachSuggest?: boolean } = {}
)

Source from the content-addressed store, hash-verified

285}
286
287function registerTextInput(
288 context: TaskModalUserFieldContext,
289 inputRefs: Map<string, HTMLInputElement>,
290 field: UserMappedField,
291 input: HTMLInputElement,
292 options: { attachSuggest?: boolean } = {}
293): void {
294 inputRefs.set(field.key, input);
295 context.attachMobileKeyboardScrollGuard(input);
296
297 if (options.attachSuggest !== false) {
298 new UserFieldSuggest(context.app, input, context.plugin, field);
299 }
300}
301
302function getTextValue(text: TextComponent): string {
303 return typeof text.getValue === "function" ? text.getValue() : text.inputEl.value;

Calls 2

setMethod · 0.65

Tested by

no test coverage detected