MCPcopy Create free account
hub / github.com/DTStack/molecule / resolveOnChange

Function resolveOnChange

src/components/input/input.tsx:40–55  ·  view source on GitHub ↗
(
    _: HTMLInputElement | HTMLTextAreaElement | null,
    e:
        | React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>
        | React.MouseEvent<HTMLElement, MouseEvent>,
    onChange?: (
        event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>
    ) => void
)

Source from the content-addressed store, hash-verified

38}
39
40export function resolveOnChange(
41 _: HTMLInputElement | HTMLTextAreaElement | null,
42 e:
43 | React.ChangeEvent<HTMLTextAreaElement | HTMLInputElement>
44 | React.MouseEvent<HTMLElement, MouseEvent>,
45 onChange?: (
46 event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>
47 ) => void
48) {
49 if (onChange) {
50 const event = e;
51 onChange(
52 event as React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>
53 );
54 }
55}
56
57export function getInputClassName(size?: SizeType, disabled?: boolean) {
58 return classNames(

Callers 2

handleChangeFunction · 0.90
InputClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected