Skip to content

Commit

Permalink
Merge pull request #75 from devtron-labs/custom-input-v2-lib
Browse files Browse the repository at this point in the history
feat: Custom input v2 lib
  • Loading branch information
shivani170 authored Jan 23, 2024
2 parents cc6d9fb + af5fa76 commit 965c93a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 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.56",
"version": "0.0.58",
"description": "Supporting common component library",
"main": "dist/index.js",
"scripts": {
Expand Down
3 changes: 1 addition & 2 deletions src/Common/CustomInput/CustomInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export function CustomInput({
additionalErrorInfo,
inputWrapClassName = '',
}: CustomInputProps) {

function handleError(error: any): any[] {
if (!Array.isArray(error)) {
return [error]
Expand All @@ -56,7 +55,7 @@ export function CustomInput({
<div className="form__error" key={error}>
<ErrorIcon className="form__icon form__icon--error" />
{error}
{typeof additionalErrorInfo === 'function' && additionalErrorInfo()}
{error && typeof additionalErrorInfo === 'function' && additionalErrorInfo()}
</div>
)
}
Expand Down

0 comments on commit 965c93a

Please sign in to comment.