question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Footer in custom MenuList

See original GitHub issue

I tried to make MenuList with footer. This is my current implementation

const MenuList = ({ children, selectProps, ...rest }) => {
  return (
    <div>
      <components.MenuList {...rest}>
        {children}
      </components.MenuList>
      {selectProps.footer && (
        <Footer {...rest}>
          {selectProps.footer}
        </Footer>
      )}
    </div>
  );
};

Footer is just simple component with styling. selectProps.footer is a clickable component (eg. button)

With this implementation, the footer is clickable but the option is not clickable. If I remove {...rest} from <Footer {...rest}> so it will become

const MenuList = ({ children, selectProps, ...rest }) => {
  return (
    <div>
      <components.MenuList {...rest}>
        {children}
      </components.MenuList>
      {selectProps.footer && (
        <Footer>
          {selectProps.footer}
        </Footer>
      )}
    </div>
  );
};

The option is clickable but the footer is not

These issues ONLY HAPPEN in touch device, it works perfectly in desktop (both option and footer are clickable). Is there any way to solve this for touch device?

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:6

github_iconTop GitHub Comments

4reactions
iseredovcommented, Feb 25, 2019

Have same problems. For example https://codesandbox.io/s/z2lj6z804p. If you try to click on the link on the touch device, then we will not go anywhere.

2reactions
kushnirybcommented, May 6, 2022

Greetings!

Stumbled upon the same issue. I’ve a custom Menu component that looks like this:

const MenuWithFooter = ({ children, selectProps, ...props }) => (
  <Components.Menu {...props}>
    {children}
    <div css={styles.footer}>{selectProps.renderFooter}</div>
  </Components.Menu>
);

renderFooter returns a button but the click is not being registered on mobile devices at all. That said, there are no issues on desktop.

Can someone suggest a workaround? I’ve tried upgrading to v4.3.1 but the issue persists.

Thanks in advance!

Read more comments on GitHub >

github_iconTop Results From Across the Web

react-select-menu-footer - CodeSandbox
CodeSandbox is an online editor tailored for web applications.
Read more >
Vuetify: custom footer for Autocomplete component
It seems to work fine when you first focus on the autocomplete component. However, after clicking on it again, the menu holding the...
Read more >
Custom WordPress Menus, Header, Footer (2020) #3 - YouTube
In part 3 we're covering making our main template files totally dynamic in our custom WordPress theme. This entails making a dynamic menu, ......
Read more >
Text color of extra menu list item element in footer - XTemos
Hi, I am building a footer. It's text color is set to white in theme's footer settings but I need the text contained...
Read more >
How to edit your footer in Divi Theme - MRKWP
Customizing Footer. Once you are inside the Theme Customizer, select Footer from the menu list. Here you can edit the basic setting for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found