Skip to content

Commit

Permalink
fix: number-field range coercion and step constrols (#5289)
Browse files Browse the repository at this point in the history
* Improving number field interactions and tests

* Change files

* Updating documentation

Co-authored-by: Chris Holt <chhol@microsoft.com>
  • Loading branch information
robarbms and chrisdholt committed Oct 22, 2021
1 parent 8e3d857 commit c1d594d
Show file tree
Hide file tree
Showing 7 changed files with 181 additions and 342 deletions.
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Improving number field interactions and tests",
"packageName": "@microsoft/fast-components",
"email": "robarb@microsoft.com",
"dependentChangeType": "patch"
}
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Improving number field interactions and tests",
"packageName": "@microsoft/fast-foundation",
"email": "robarb@microsoft.com",
"dependentChangeType": "patch"
}
Expand Up @@ -9,11 +9,11 @@ <h2>Hide step</h2>
<h2>With value</h2>
<fast-number-field value="10"></fast-number-field>

<h2>With min 1 and max 10</h2>
<fast-number-field value="5" min="1" max="10"></fast-number-field>
<h2>With min 10 and max 100</h2>
<fast-number-field value="5" min="10" max="100"></fast-number-field>

<h2>0.1 stepping</h2>
<fast-number-field value="0.2" min="0" max="1" step=".1"></fast-number-field>
<fast-number-field value="0.2" step=".1"></fast-number-field>

<h2>Full Width</h2>
<fast-number-field style="width: 100%;"></fast-number-field>
Expand Down
3 changes: 2 additions & 1 deletion packages/web-components/fast-foundation/docs/api-report.md
Expand Up @@ -1542,7 +1542,8 @@ export class NumberField extends FormAssociatedNumberField {
control: HTMLInputElement;
// @internal (undocumented)
defaultSlottedNodes: Node[];
displayText: string;
// @internal
handleBlur(): void;
// @internal
handleChange(): void;
// @internal
Expand Down

0 comments on commit c1d594d

Please sign in to comment.