MCPcopy Index your code
hub / github.com/tinyplex/tinybase / bindUI

Function bindUI

site/js/common/search.ts:107–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105
106 // UI behavior
107 const bindUI = () => {
108 nav.prepend(search);
109 const showResults = () =>
110 (input.value ? addClass : delClass)(results, 'show');
111 input.addEventListener('focus', showResults);
112 input.addEventListener('input', () => {
113 showResults();
114 populateResults();
115 });
116 input.addEventListener('blur', () => delClass(results, 'show'));
117 bindKeyboard();
118 };
119
120 // Populate results
121 const populateResults = () => {

Callers 1

searchLoadFunction · 0.85

Calls 5

delClassFunction · 0.90
showResultsFunction · 0.85
populateResultsFunction · 0.85
bindKeyboardFunction · 0.85
addEventListenerMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…