From b47089cbe85de59fafe3b399629f9ef56a812b71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Mon, 3 May 2021 12:00:51 +0100 Subject: [PATCH] fix(ui): resolve popper warnings --- ui/src/Common/Popper.ts | 14 ++++++++++++++ .../Grid/AlertGrid/AlertGroup/Alert/AlertMenu.tsx | 2 +- .../AlertGrid/AlertGroup/GroupHeader/GroupMenu.tsx | 2 +- .../Components/Grid/AlertGrid/GridLabelSelect.tsx | 2 +- ui/src/Components/NavBar/FilterInput/History.tsx | 2 +- ui/src/Components/NavBar/FilterInput/index.tsx | 2 +- 6 files changed, 19 insertions(+), 5 deletions(-) diff --git a/ui/src/Common/Popper.ts b/ui/src/Common/Popper.ts index 0aa541d35..599142a00 100644 --- a/ui/src/Common/Popper.ts +++ b/ui/src/Common/Popper.ts @@ -6,4 +6,18 @@ export const CommonPopperModifiers = [ gpuAcceleration: false, }, }, + { + name: "offset", + options: { + offset: [0, 5], + }, + }, + { + name: "computeStyles", + options: { + gpuAcceleration: false, + adaptive: false, + roundOffsets: true, + }, + }, ]; diff --git a/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.tsx b/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.tsx index 25be7e1b5..9d9cb705b 100644 --- a/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.tsx +++ b/ui/src/Components/Grid/AlertGrid/AlertGroup/Alert/AlertMenu.tsx @@ -85,7 +85,7 @@ const MenuContent: FC<{ return (
{ return (
{isOpen && inputValue && suggestions.length ? ( -
+
{suggestions.slice(0, 10).map((item, index) => (