Skip to content

Commit

Permalink
fix(designer): Fix Combobox erroring when non-string displayName are …
Browse files Browse the repository at this point in the history
…used (#4549)

update
  • Loading branch information
Eric-B-Wu committed Apr 4, 2024
1 parent f16b4cb commit 28f196a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 1 addition & 2 deletions apps/Standalone/src/desginer/app/DesignerShell/designer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import { QueryClientProvider, useQuery } from 'react-query';
const standaloneQueryClient = getReactQueryClient();

const LoadWhenArmTokenIsLoaded = ({ children }: { children: ReactNode }) => {
const { data, isLoading } = useQuery('armToken', loadToken);
console.log(data);
const { isLoading } = useQuery('armToken', loadToken);
return isLoading ? null : <>{children}</>;
};
export const DesignerWrapper = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ export const TokenField = ({
placeholder={placeholder}
readonly={readOnly}
initialValue={value}
options={dropdownOptions.map((option: any, index: number) => ({ key: index.toString(), ...option }))}
options={dropdownOptions.map((option: any, index: number) => ({
key: index.toString(),
...option,
displayName: typeof option.displayName === 'string' ? option.displayName : JSON.stringify(option.displayName),
}))}
useOption={true}
isLoading={isLoading}
errorDetails={errorDetails}
Expand Down

0 comments on commit 28f196a

Please sign in to comment.