-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(Form): Add EnumField #1967
feat(Form): Add EnumField #1967
Conversation
f15df55
to
48e6497
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @tplevko, looks good, just a few touches and we're good 👌
@@ -57,6 +58,7 @@ export const Typeahead: FunctionComponent<TypeaheadProps> = ({ | |||
const onTextInputClear = () => { | |||
setInputValue(''); | |||
setIsOpen(true); | |||
onCleanInput(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This object could be undefined when using the TypeaheadField
outside of the EnumField
scope.
onCleanInput(); | |
onCleanInput?.(); |
if (!isDefined(item)) { | ||
onChange(undefined); | ||
return; | ||
} | ||
onChange(item.name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could simplify it to:
if (!isDefined(item)) { | |
onChange(undefined); | |
return; | |
} | |
onChange(item.name); | |
onChange(item?.name); |
name: String(item), | ||
description: '', | ||
value: String(item), | ||
})) || [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
})) || [], | |
})) ?? [], |
48e6497
to
e8ad2b6
Compare
Quality Gate passedIssues Measures |
92da3c1
into
KaotoIO:feat/form-with-anyof-support
Context
Add support for EnumField
part of: #1939