diff --git a/packages/kbn-unified-data-table/src/components/data_table_additional_display_settings.tsx b/packages/kbn-unified-data-table/src/components/data_table_additional_display_settings.tsx
index 164ab402dd46d..f57127d185a94 100644
--- a/packages/kbn-unified-data-table/src/components/data_table_additional_display_settings.tsx
+++ b/packages/kbn-unified-data-table/src/components/data_table_additional_display_settings.tsx
@@ -90,54 +90,65 @@ export const UnifiedDataTableAdditionalDisplaySettings: React.FC<
setActiveSampleSize(sampleSize); // reset local state
}, [sampleSize, setActiveSampleSize]);
+ const settings = [];
+
+ if (onChangeHeaderRowHeight && onChangeHeaderRowHeightLines) {
+ settings.push(
+
+ );
+ }
+
+ if (onChangeRowHeight && onChangeRowHeightLines) {
+ settings.push(
+
+ );
+ }
+
+ if (onChangeSampleSize) {
+ settings.push(
+
+
+
+ );
+ }
+
return (
<>
- {onChangeHeaderRowHeight && onChangeHeaderRowHeightLines && (
-
- )}
- {onChangeRowHeight && onChangeRowHeightLines && (
- <>
-
-
- >
- )}
- {onChangeSampleSize && (
- <>
-
-
-
-
- >
- )}
+ {settings.map((setting, index) => (
+
+ {index > 0 && }
+ {setting}
+
+ ))}
>
);
};