Expandable list remove anchor (#5559)

Deprecate anchorElement on ExpandableList to avoid props drilling. The
anchorElement should be the ExpandableList container itself
This commit is contained in:
Charles Bochet
2024-05-24 12:26:42 +02:00
committed by GitHub
parent 7f7ea59b51
commit 82ec30c957
10 changed files with 7 additions and 26 deletions

View File

@ -80,7 +80,6 @@ export const FieldDisplay = ({
) : isFieldLinks(fieldDefinition) ? (
<LinksFieldDisplay
isCellSoftFocused={isCellSoftFocused}
cellElement={cellElement}
fromTableCell={fromTableCell}
/>
) : isFieldCurrency(fieldDefinition) ? (

View File

@ -3,13 +3,11 @@ import { LinksDisplay } from '@/ui/field/display/components/LinksDisplay';
type LinksFieldDisplayProps = {
isCellSoftFocused?: boolean;
cellElement?: HTMLElement;
fromTableCell?: boolean;
};
export const LinksFieldDisplay = ({
isCellSoftFocused,
cellElement,
fromTableCell,
}: LinksFieldDisplayProps) => {
const { fieldValue } = useLinksField();
@ -17,7 +15,6 @@ export const LinksFieldDisplay = ({
return (
<LinksDisplay
value={fieldValue}
anchorElement={cellElement}
isChipCountDisplayed={isCellSoftFocused}
withExpandedListBorder={fromTableCell}
/>

View File

@ -11,7 +11,6 @@ type MultiSelectFieldDisplayProps = {
export const MultiSelectFieldDisplay = ({
isCellSoftFocused,
cellElement,
fromTableCell,
}: MultiSelectFieldDisplayProps) => {
const { fieldValues, fieldDefinition } = useMultiSelectField();
@ -26,7 +25,6 @@ export const MultiSelectFieldDisplay = ({
return (
<ExpandableList
anchorElement={cellElement}
isChipCountDisplayed={isCellSoftFocused}
withExpandedListBorder={fromTableCell}
>