♻️ Change overflow:scroll to overflow:auto

This commit is contained in:
Baptiste Arnaud
2024-01-25 16:35:16 +01:00
parent 0f245b8e57
commit ab010657b2
29 changed files with 28 additions and 55 deletions

View File

@@ -78,7 +78,7 @@ export const DropdownList = <T extends readonly any[]>({
</MenuButton>
<Portal>
<MenuList maxW="500px" zIndex={1500}>
<Stack maxH={'35vh'} overflowY="scroll" spacing="0">
<Stack maxH={'35vh'} overflowY="auto" spacing="0">
{items.map((item) => (
<MenuItem
key={item as unknown as string}

View File

@@ -34,7 +34,7 @@ export const GiphyPicker = ({ onSubmit }: GiphySearchFormProps) => {
/>
<GiphyLogo w="100px" />
</Flex>
<Flex overflowY="scroll" maxH="400px">
<Flex overflowY="auto" maxH="400px">
<Grid
key={inputValue}
onGifClick={(gif, e) => {

View File

@@ -115,7 +115,7 @@ export const IconPicker = ({ onIconSelected }: Props) => {
<ColorPicker value={selectedColor} onColorChange={updateColor} />
</HStack>
<Stack overflowY="scroll" maxH="350px" ref={scrollContainer} spacing={4}>
<Stack overflowY="auto" maxH="350px" ref={scrollContainer} spacing={4}>
{recentIconNames.length > 0 && (
<Stack>
<Text fontSize="xs" color="gray.400" fontWeight="semibold" pl="2">

View File

@@ -155,7 +155,7 @@ export const UnsplashPicker = ({ imageSize, onImageSelect }: Props) => {
{error}
</Alert>
)}
<Stack overflowY="scroll" maxH="400px" ref={scrollContainer}>
<Stack overflowY="auto" maxH="400px" ref={scrollContainer}>
{images.length > 0 && (
<Grid templateColumns="repeat(3, 1fr)" columnGap={2} rowGap={3}>
{images.map((image, index) => (

View File

@@ -110,7 +110,7 @@ export const EmojiSearchableList = ({
placeholder={t('emojiList.searchInput.placeholder')}
onChange={handleSearchChange}
/>
<Stack ref={scrollContainer} overflow="scroll" maxH="350px" spacing={4}>
<Stack ref={scrollContainer} overflowY="scroll" maxH="350px" spacing={4}>
{recentEmojis.length > 0 && (
<Stack>
<Text fontSize="xs" color="gray.400" fontWeight="semibold" pl="2">

View File

@@ -181,7 +181,7 @@ export const AutocompleteInput = ({
<Portal containerRef={parentModalRef}>
<PopoverContent
maxH="35vh"
overflowY="scroll"
overflowY="auto"
role="menu"
w="inherit"
shadow="lg"

View File

@@ -217,7 +217,7 @@ export const Select = <T extends Item>({
<Portal containerRef={parentModalRef}>
<PopoverContent
maxH="35vh"
overflowY="scroll"
overflowY="auto"
role="menu"
w="inherit"
shadow="lg"

View File

@@ -233,7 +233,7 @@ export const VariableSearchInput = ({
<Portal containerRef={parentModalRef}>
<PopoverContent
maxH="35vh"
overflowY="scroll"
overflowY="auto"
role="menu"
w="inherit"
shadow="lg"