Skip to content

Commit fb1524c

Browse files
committed
remove alwaysShowSubComponent
1 parent 32d1085 commit fb1524c

File tree

3 files changed

+2
-20
lines changed

3 files changed

+2
-20
lines changed

packages/main/src/components/AnalyticalTable/AnalyticalTable.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ const TableWithSubcomponents = (props) => {
356356
data={props.data}
357357
columns={props.columns}
358358
renderRowSubComponent={renderRowSubComponent}
359-
alwaysShowSubComponent={false} //default value
359+
subComponentsBehavior={AnalyticalTableSubComponentsBehavior.Expandable} //default value
360360
/>
361361
);
362362
};

packages/main/src/components/AnalyticalTable/index.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import { useVirtualizer } from '@tanstack/react-virtual';
44
import {
55
debounce,
6-
deprecationNotice,
76
enrichEventWithDetails,
87
useI18nBundle,
98
useIsomorphicId,
@@ -158,25 +157,14 @@ const AnalyticalTable = forwardRef<AnalyticalTableDomRef, AnalyticalTablePropTyp
158157
LoadingComponent = DefaultLoadingComponent,
159158
NoDataComponent = DefaultNoDataComponent,
160159
additionalEmptyRowsCount = 0,
161-
alwaysShowSubComponent: _omit,
162160
...rest
163161
} = props;
164162

165163
useStylesheet(styleData, AnalyticalTable.displayName);
166164

167-
useEffect(() => {
168-
if (props.alwaysShowSubComponent != undefined) {
169-
deprecationNotice(
170-
'alwaysShowSubComponent',
171-
'`alwaysShowSubComponent` is deprecated. Please use `subComponentsBehavior` instead!'
172-
);
173-
}
174-
}, [props.alwaysShowSubComponent]);
175-
176165
const alwaysShowSubComponent =
177166
subComponentsBehavior === AnalyticalTableSubComponentsBehavior.Visible ||
178-
subComponentsBehavior === AnalyticalTableSubComponentsBehavior.IncludeHeight ||
179-
props.alwaysShowSubComponent;
167+
subComponentsBehavior === AnalyticalTableSubComponentsBehavior.IncludeHeight;
180168

181169
const uniqueId = useIsomorphicId();
182170
const i18nBundle = useI18nBundle('@ui5/webcomponents-react');

packages/main/src/components/AnalyticalTable/types/index.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -597,12 +597,6 @@ export interface AnalyticalTablePropTypes extends Omit<CommonProps, 'title'> {
597597
* __Note:__ Subcomponents can affect performance, especially when used in a tree table (`isTreeTable={true}`). If you face performance issues, please try memoizing your subcomponent.
598598
*/
599599
renderRowSubComponent?: (row?: any) => ReactNode;
600-
/**
601-
* Defines whether a subcomponent should be rendered as expandable container or directly at the bottom of the row.
602-
*
603-
* @deprecated please use `subComponentsBehavior` instead.
604-
*/
605-
alwaysShowSubComponent?: boolean;
606600
/**
607601
* Defines the rendering and height calculation behavior of subcomponents when `renderRowSubComponent` is used.
608602
*

0 commit comments

Comments
 (0)