From bd125d2915358f1c5ed97f4570086d75f24fb53d Mon Sep 17 00:00:00 2001
From: Matiss Janis Aboltins <matiss@mja.lv>
Date: Wed, 5 Jul 2023 21:13:37 +0100
Subject: [PATCH] :bug:  custom select width and scrollbars (#1294)

Closes #1286, closes #1283

Scrollbar fix by @aleetsaiya
---
 .../desktop-client/src/components/common/CustomSelect.tsx   | 2 +-
 packages/desktop-client/src/components/reports/Header.js    | 4 ++--
 upcoming-release-notes/1294.md                              | 6 ++++++
 3 files changed, 9 insertions(+), 3 deletions(-)
 create mode 100644 upcoming-release-notes/1294.md

diff --git a/packages/desktop-client/src/components/common/CustomSelect.tsx b/packages/desktop-client/src/components/common/CustomSelect.tsx
index 7114057fc..cafc24f4f 100644
--- a/packages/desktop-client/src/components/common/CustomSelect.tsx
+++ b/packages/desktop-client/src/components/common/CustomSelect.tsx
@@ -35,7 +35,7 @@ export default function CustomSelect({
         arrow={<ExpandArrow style={{ width: 7, height: 7, paddingTop: 3 }} />}
       />
       <ListboxPopover style={{ zIndex: 10000, outline: 0, borderRadius: 4 }}>
-        <ListboxList>
+        <ListboxList style={{ maxHeight: 250, overflowY: 'scroll' }}>
           {options.map(([value, label]) => (
             <ListboxOption
               key={value}
diff --git a/packages/desktop-client/src/components/reports/Header.js b/packages/desktop-client/src/components/reports/Header.js
index dd566622e..25f7da761 100644
--- a/packages/desktop-client/src/components/reports/Header.js
+++ b/packages/desktop-client/src/components/reports/Header.js
@@ -91,7 +91,7 @@ function Header({
           }}
         >
           <CustomSelect
-            style={{ backgroundColor: 'white', width: 130 }}
+            style={{ backgroundColor: 'white' }}
             onChange={newValue =>
               onChangeDates(...validateStart(allMonths, newValue, end))
             }
@@ -100,7 +100,7 @@ function Header({
           />
           <View>to</View>
           <CustomSelect
-            style={{ backgroundColor: 'white', width: 130 }}
+            style={{ backgroundColor: 'white' }}
             onChange={newValue =>
               onChangeDates(...validateEnd(allMonths, start, newValue))
             }
diff --git a/upcoming-release-notes/1294.md b/upcoming-release-notes/1294.md
new file mode 100644
index 000000000..fec57a168
--- /dev/null
+++ b/upcoming-release-notes/1294.md
@@ -0,0 +1,6 @@
+---
+category: Bugfix
+authors: [MatissJanis, aleetsaiya]
+---
+
+Fix month picker responsiveness in reports page and make the select boxes scrollable
-- 
GitLab