diff --git a/CHANGELOG.md b/CHANGELOG.md index f6ad4c847..ae2721d3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. This projects adheres to [Semantic Versioning](https://semver.org/) and [Keep a CHANGELOG](https://keepachangelog.com/). +## [13.0.4] + +### Changed +- Tweaked auto offset calculation in `WidthOffsetRangeSlider`. + ## [13.0.3] ### Changed @@ -1358,6 +1363,7 @@ Follow this migration script in order for you project to work correctly with the - Initial tagged release. [Unreleased]: https://github.com/infinum/eightshift-frontend-libs/compare/master...HEAD +[13.0.4]: https://github.com/infinum/eightshift-frontend-libs/compare/13.0.3...13.0.4 [13.0.3]: https://github.com/infinum/eightshift-frontend-libs/compare/13.0.2...13.0.3 [13.0.2]: https://github.com/infinum/eightshift-frontend-libs/compare/13.0.1...13.0.2 [13.0.1]: https://github.com/infinum/eightshift-frontend-libs/compare/13.0.0...13.0.1 diff --git a/package.json b/package.json index d4ec1f909..9bdd4d09b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@eightshift/frontend-libs", - "version": "13.0.3", + "version": "13.0.4", "description": "A collection of useful frontend utility modules. powered by Eightshift", "author": { "name": "Eightshift team", diff --git a/scripts/components/width-offset-range-slider/width-offset-range-slider.js b/scripts/components/width-offset-range-slider/width-offset-range-slider.js index bc608345b..bb61390ec 100644 --- a/scripts/components/width-offset-range-slider/width-offset-range-slider.js +++ b/scripts/components/width-offset-range-slider/width-offset-range-slider.js @@ -207,7 +207,7 @@ export const WidthOffsetRangeSlider = (props) => { key={breakpoint} aria-label={__('Width & offset', 'eightshift-frontend-libs')} columns={totalNumberOfColumns} - value={[parsedOffset, displayedWidth]} + value={isWidthInherited && !isOffsetInherited ? [parsedOffset, parsedOffset + 1] : [parsedOffset, displayedWidth]} showOuterAsGutter={showOuterAsGutter ?? parsedFullWidth} onChange={([o, w]) => { let newValues = {}; @@ -219,7 +219,7 @@ export const WidthOffsetRangeSlider = (props) => { ? String(w - nearestValidOffset + 1) : w - nearestValidOffset + 1; } else if (!isWidthInherited && offset === autoOffsetValue) { - const newWidth = w - autoStartOffset; + const newWidth = w - autoStartOffset + 1; if (newWidth > 0) { newValues.width = stringValues