MCPcopy Index your code
hub / github.com/chartbrew/chartbrew / _removeOption

Function _removeOption

client/src/sources/api/api-connection-form.jsx:181–191  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

179 };
180
181 const _removeOption = (id) => {
182 const tempOptions = connection.optionsArray;
183 const newOptions = [];
184 for (let i = 0; i < tempOptions.length; i++) {
185 if (tempOptions[i].id !== id) {
186 newOptions.push(tempOptions[i]);
187 }
188 }
189
190 setConnection({ ...connection, optionsArray: newOptions });
191 };
192
193 const _onChangeOption = (id, value, selector) => {
194 const tempOptions = connection.optionsArray;

Callers 1

ApiConnectionFormFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected