All Downloads are FREE. Search and download functionalities are using the official Maven repository.

theme.keycloak.v2.admin.resources.assets.KeycloakTextArea-b4f2aa51.js.map Maven / Gradle / Ivy

There is a newer version: 25.0.1
Show newest version
{"version":3,"file":"KeycloakTextArea-b4f2aa51.js","sources":["../../src/components/keycloak-text-area/KeycloakTextArea.tsx"],"sourcesContent":["import { TextArea, TextAreaProps } from \"@patternfly/react-core\";\nimport { ComponentProps, forwardRef, HTMLProps } from \"react\";\n\n// PatternFly changes the signature of the 'onChange' handler for textarea elements.\n// This causes issues with React Hook Form as it expects the default signature for a textarea element.\n// So we have to create this wrapper component that takes care of converting these signatures for us.\n\nexport type KeycloakTextAreaProps = Omit<\n  ComponentProps,\n  \"onChange\"\n> &\n  Pick, \"onChange\">;\n\nexport const KeycloakTextArea = forwardRef<\n  HTMLTextAreaElement,\n  KeycloakTextAreaProps\n>(({ onChange, ...props }, ref) => {\n  const onChangeForward: TextAreaProps[\"onChange\"] = (_, event) =>\n    onChange?.(event);\n\n  return