feat(QRange): new props -> min-range and max-range
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
devbranch (orv[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.
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
*/
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.