Skip to content

Commit

Permalink
Merge pull request #644 from contember/fix/select
Browse files Browse the repository at this point in the history
select fixes
  • Loading branch information
matej21 authored Dec 28, 2023
2 parents 7d49770 + 93736b6 commit a515c2d
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export const MultiSelectFieldInner = memo(({
MultiValueLabel: SortableMultiValueLabel,
} as any}
/>
: <Select menuPortalTarget={portalProvider} {...allSelectProps} />
: <Select {...allSelectProps} />
}
</SelectCreateNewWrapper>
</FieldContainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ export const SelectFieldInner = typedMemo(<T = unknown>({
<Select
{...selectProps}
menuPlacement="auto"
menuPortalTarget={usePortalProvider()}
isClearable={allowNull === true}
value={currentValue}
isLoading={isLoading}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,5 @@ export const useCommonReactSelectProps = <T>({
Input: SearchInput,
},
filterOption: () => true,
menuPosition: 'fixed',
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
Entity,
EntityAccessor,
EntitySubTree,
TreeRootIdProvider,
useAccessorTreeState,
useEnvironment,
useExtendTree,
Expand Down Expand Up @@ -60,7 +61,11 @@ export const useOpenCreateNewDialog = ({ createNewForm, connect, ...props }: Bas
content: contentProps => (
<Stack>
<AccessorTree state={accessorTreeState}>
<Entity accessor={entity}>{createNewForm}</Entity>
<TreeRootIdProvider treeRootId={treeRootId}>
<Entity accessor={entity}>
{createNewForm}
</Entity>
</TreeRootIdProvider>
</AccessorTree>
<Stack horizontal evenly>
</Stack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const useDynamicMultipleChoiceWithConnectingEntityField = (
onRemove: useCallback(value => {
optionIdToConnectingEntityMap.get(value.id)?.deleteEntity()
}, [optionIdToConnectingEntityMap]),
onMove: sortedConnectingEntities.moveEntity,
onMove: props.sortableBy ? sortedConnectingEntities.moveEntity : undefined,
onSearch,
isLoading,
}
Expand Down

0 comments on commit a515c2d

Please sign in to comment.