MCPcopy
hub / github.com/Comfy-Org/ComfyUI-Manager / bindEvents

Method bindEvents

comfyui_manager/js/model-manager.js:123–196  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

121 }
122
123 bindEvents() {
124 const eventsMap = {
125 ".cmm-manager-filter": {
126 change: (e) => {
127 this.filter = e.target.value;
128 this.updateGrid();
129 }
130 },
131 ".cmm-manager-type": {
132 change: (e) => {
133 this.type = e.target.value;
134 this.updateGrid();
135 }
136 },
137 ".cmm-manager-base": {
138 change: (e) => {
139 this.base = e.target.value;
140 this.updateGrid();
141 }
142 },
143
144 ".cmm-manager-keywords": {
145 input: (e) => {
146 const keywords = `${e.target.value}`.trim();
147 if (keywords !== this.keywords) {
148 this.keywords = keywords;
149 this.updateGrid();
150 }
151 },
152 focus: (e) => e.target.select()
153 },
154
155 ".cmm-manager-selection": {
156 click: (e) => {
157 const target = e.target;
158 const mode = target.getAttribute("mode");
159 if (mode === "install") {
160 this.installModels(this.selectedModels, target);
161 }
162 }
163 },
164
165 ".cmm-manager-refresh": {
166 click: () => {
167 app.refreshComboInNodes();
168 }
169 },
170
171 ".cmm-manager-stop": {
172 click: () => {
173 api.fetchApi('/v2/manager/queue/reset', { method: 'POST' });
174 infoToast('Cancel', 'Remaining tasks will stop after completing the current task.');
175 }
176 },
177
178 ".cmm-manager-back": {
179 click: (e) => {
180 this.close()

Callers 1

initMethod · 0.95

Calls 7

updateGridMethod · 0.95
installModelsMethod · 0.95
closeMethod · 0.95
infoToastFunction · 0.90
fetchApiMethod · 0.45
showMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected