Skip to content

Hiding popper arrow should remove offset #5969

@cypherfunc

Description

@cypherfunc

Describe the bug
withFloating hard-codes a 10px offset to make space for the arrow, which is not removed if showPopperArrow is false. code reference

Overriding this offset then requires a hack per issue #4564
EDIT: or you can pass a negative offset to counteract it, like this:

<DatePicker
    {...otherProps}
    popperModifiers={[offset(-10)]}
    showPopperArrow={false}
/>

To Reproduce
Steps to reproduce the behavior:

  1. pass showPopperArrow={false}
  2. click the input to open the calendar
  3. calendar is still offset

Expected behavior
If it doesn't have an arrow, it shouldn't be offset.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions