quasar icon indicating copy to clipboard operation
quasar copied to clipboard

feat(QRange): new props -> min-range and max-range

Open thexeos opened this issue 1 month ago β€’ 2 comments

What kind of change does this PR introduce?

  • [X] Feature
  • [X] Documentation

Does this PR introduce a breaking change?

  • [X] No

The PR fulfills these requirements:

  • [X] It's submitted to the dev branch (or v[X] branch)
  • [ ] It's been tested on a Cordova (iOS, Android) app
  • [ ] It's been tested on an Electron app
  • [X] Any necessary documentation has been added or updated in the docs or explained in the PR's description.

If adding a new feature, the PR's description includes:

  • [X] A convincing reason for adding this feature (to avoid wasting your time, it's best to start a new feature discussion first and wait for approval before working on it)

Sometimes it is necessary to cap the range input model not to maximum/minimum value within the range (innerMin/innerMax) but to a minimum or maximum range width. Example would include things like entering event duration, where minimum duration is 15 minutes, but it can be placed anywhere within the hour block.

The feature replicates the behavior of innerMin/innerMax, where external changes to modelValue that would fall outside the range of innerMin/innerMax are "ignored" and instead innerMin/innerMax value is used.

chrome_bIsfn2S01r

thexeos avatar Nov 22 '25 14:11 thexeos

Build Results

JSON API

πŸ“œ Changes detected:

diff --git a/./current-build/api/QRange.json b/./pr-build/api/QRange.json
index 5067ca5..c221004 100644
--- a/./current-build/api/QRange.json
+++ b/./pr-build/api/QRange.json
@@ -414,6 +414,25 @@
         "# v-model=\"positionModel\""
       ]
     },
+    "min-range": {
+      "type": "Number",
+      "default": "0",
+      "desc": "Minimum allowed difference between the max and min values",
+      "category": "model",
+      "addedIn": "v2.18.7",
+      "required": false
+    },
+    "max-range": {
+      "type": [
+        "Number",
+        "null"
+      ],
+      "default": "null",
+      "desc": "Maximum allowed difference between the max and min values",
+      "category": "model",
+      "addedIn": "v2.18.7",
+      "required": false
+    },
     "drag-range": {
       "type": "Boolean",
       "desc": "User can drag range instead of just the two thumbs",

Types

πŸ“œ Changes detected:

diff --git a/./current-build/types/index.d.ts b/./pr-build/types/index.d.ts
index a72729b..c869407 100644
--- a/./current-build/types/index.d.ts
+++ b/./pr-build/types/index.d.ts
@@ -10072,6 +10072,16 @@ export interface QRangeProps {
       }
     | null
     | undefined;
+  /**
+   * Minimum allowed difference between the max and min values
+   * Default value: 0
+   */
+  minRange?: number | undefined;
+  /**
+   * Maximum allowed difference between the max and min values
+   * Default value: null
+   */
+  maxRange?: number | null | undefined;
   /**
    * User can drag range instead of just the two thumbs
    */

github-actions[bot] avatar Nov 22 '25 14:11 github-actions[bot]

UI Tests Results

β€‡β€ˆβ€‡β€‡1 filesβ€„β€ƒβ€‡β€ˆβ€‡98 suites   41s ⏱️ 1β€ˆ031 tests 1β€ˆ031 βœ…β€ƒ0 πŸ’€β€ƒ0 ❌ 1β€ˆ050 runsβ€Šβ€ƒ1β€ˆ050 βœ…β€ƒ0 πŸ’€β€ƒ0 ❌

Results for commit 6f301b23.

github-actions[bot] avatar Nov 22 '25 14:11 github-actions[bot]