MCPcopy Create free account
hub / github.com/FeatureProbe/FeatureProbe / handleChange

Function handleChange

ui/src/pages/toggle/hooks.tsx:81–94  ·  view source on GitHub ↗
(e: SyntheticEvent, detail: InputOnChangeData | TextAreaProps | DropdownProps | CheckboxProps, type: string)

Source from the content-addressed store, hash-verified

79 });
80
81 const handleChange = (e: SyntheticEvent, detail: InputOnChangeData | TextAreaProps | DropdownProps | CheckboxProps, type: string) => {
82 const value = detail.value;
83
84 if (type === 'clientAvailability') {
85 toggleInfo[type] = detail.value === 'yes';
86 } else if ( type === 'permanent' ) {
87 toggleInfo[type] = detail.name === 'permanent-yes';
88 } else {
89 // @ts-ignore detail value
90 toggleInfo[type] = value;
91 }
92
93 saveToggleInfo({...toggleInfo});
94 };
95
96 return {
97 toggleInfo,

Callers 6

ToggleFunction · 0.70
ServeFunction · 0.50
RuleTitleFunction · 0.50
MemberDrawerFunction · 0.50
ListFunction · 0.50
DrawerFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected