Skip to content
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

fix: business attribute empty bubble selection issue #11720

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ export default function EditBusinessAttributeModal({
event.stopPropagation();
};
/* eslint-disable-next-line react/prop-types */
const selectedItem = displayedAttributes.find((attribute) => attribute.urn === value)?.component;
const selectedItem = selectedAttribute
? selectedAttribute?.props?.component
: displayedAttributes.find((attribute) => attribute.urn === value)?.component;
return (
<StyleTag onMouseDown={onPreventMouseDown} closable={closable} onClose={onClose}>
{selectedItem}
Expand All @@ -172,7 +174,7 @@ export default function EditBusinessAttributeModal({
const onSelectValue = (selectedUrn: string) => {
const selectedSearchOption = attributeSearchOptions?.find((option) => option.props.value === selectedUrn);
setUrn(selectedUrn);
if (!selectedAttribute) {
if (selectedAttribute?.selectedUrn !== selectedUrn) {
setSelectedAttribute({
selectedUrn,
component: (
Expand Down
Loading