Skip to content

Commit

Permalink
Added defaultValue in Custom Input
Browse files Browse the repository at this point in the history
  • Loading branch information
shivani170 committed Dec 18, 2023
1 parent 3e4dc18 commit 84308d0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@devtron-labs/devtron-fe-common-lib",
"version": "0.0.45-beta-21",
"version": "0.0.45-beta-22",
"description": "Supporting common component library",
"main": "dist/index.js",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion src/Common/CustomInput/CustomInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ export function CustomInput({
readOnly = false,
noTrim = false,
ref,
onKeyPress
onKeyPress,
defaultValue,
}: CustomInputProps) {
const renderLabelHelperText = () => {
return (
Expand Down Expand Up @@ -110,6 +111,7 @@ export function CustomInput({
readOnly={readOnly}
ref={ref}
onKeyPress={onKeyPress}
defaultValue={defaultValue}
/>

{renderFormError()}
Expand Down
1 change: 1 addition & 0 deletions src/Common/CustomInput/Types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ export interface CustomInputProps {
noTrim?: boolean
ref?: LegacyRef<HTMLInputElement>
onKeyPress?: (e) => void
defaultValue?: string | number | ReadonlyArray<string> | undefined;
}

0 comments on commit 84308d0

Please sign in to comment.