-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove last-in-range style modifiers to fix border issue #1538
Remove last-in-range style modifiers to fix border issue #1538
Conversation
bed5402
to
34ded9e
Compare
@@ -2698,18 +2698,6 @@ describe('DayPickerRangeController', () => { | |||
expect(modifiers.has('selected-span')).to.equal(true); | |||
}); | |||
|
|||
it('contains `last-in-range` if this.isLastInRange returns true', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of this test indicates it’s a breaking change; can we avoid that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can revert the code deleted on this.modifier
but keep the deleted last in range check and styles add that caused the issue
@ljharb let me know if there's anything else you'd like me to do :) |
@@ -160,14 +159,6 @@ export const selectedSpanStyles = { | |||
}, | |||
}; | |||
|
|||
export const lastInRangeStyles = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be really careful about breaking changes, we might want to keep this as export const lastInRangeStyles = {}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think making lastInRangeStyles = {}
would fix the bug without needing to completely remove the modifier's styles. This would make it so that there is no built-in styling for lastInRange
, thus fixing the bug, but you could still supply your own styles if you wanted to.
b98bbb5
to
8f46272
Compare
@majapw anything else needed to get this merged in? |
Fixes issue #1536
Before
After