Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
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 @@ -36,7 +36,7 @@ export function WithTypeIcons(WrappedComponent: FieldWidget): FieldWidget {
required={props.required}
/>
<div css={styles.mainWrapper}>
<div css={styles.iconWrapper}>{iconText}</div>
{iconText && <div css={styles.iconWrapper}>{iconText}</div>}
<div css={styles.componentWrapper}>
<WrappedComponent {...props} label={undefined} />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ export function getOptions(
schema: JSONSchema7,
definitions?: SchemaDefinitions
): { options: IDropdownOption[]; isNested: boolean } {
const { type, oneOf } = schema;
const { type, oneOf, additionalProperties } = schema;

let isNested = false;
let isNested = !!additionalProperties;

if (type && Array.isArray(type)) {
const options: IDropdownOption[] = type.map((t) => ({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ const ObjectItem: React.FC<ObjectItemProps> = ({
{...rest}
definitions={definitions}
id={`${name}.value`}
label={stackedLayout ? formatMessage('Value') : false}
name="value"
placeholder={placeholder}
schema={schema}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ export const filler = css`

export const item = (stackedLayout?: boolean) => css`
flex: 1;

display: flex;
flex-direction: column;
justify-content: center;
& + & {
margin-left: ${!stackedLayout ? '16px' : '0'};
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

export const getFieldIconText = (type: any): string => {
export const getFieldIconText = (type: any): string | undefined => {
const typeFormatted = Array.isArray(type) ? type[0] : type;
if (typeFormatted === 'string') {
return 'abc';
Expand All @@ -16,5 +16,4 @@ export const getFieldIconText = (type: any): string => {
} else if (typeFormatted === 'expression') {
return '=';
}
return '';
};