File tree Expand file tree Collapse file tree
_samples/main/StepInput/Numeric Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -258,6 +258,9 @@ class StepInput extends UI5Element implements IFormInputElement {
258258 @property ( )
259259 accessibleNameRef ?: string ;
260260
261+ @property ( { type : Boolean } )
262+ hideStepButtons = false ;
263+
261264 @property ( { noAttribute : true } )
262265 _decIconDisabled = false ;
263266
Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ export default function StepInputTemplate(this: StepInput) {
3131 onMouseDown = { this . _decSpin }
3232 onMouseUp = { this . _resetSpin }
3333 onMouseOut = { this . _resetSpinOut }
34+ hidden = { this . hideStepButtons }
3435 class = { {
3536 "inputIcon" : true ,
3637 "ui5-step-input-icon--clickable" : this . _decIconClickable ,
@@ -86,6 +87,7 @@ export default function StepInputTemplate(this: StepInput) {
8687 onMouseUp = { this . _resetSpin }
8788 onMouseOut = { this . _resetSpinOut }
8889 showTooltip = { true }
90+ hidden = { this . hideStepButtons }
8991 />
9092 </ div >
9193 }
Original file line number Diff line number Diff line change @@ -176,6 +176,12 @@ <h3>StepInput with large value and precision (thousands separator)</h3>
176176 </ ui5-step-input >
177177 </ div >
178178
179+ < h3 > Step Input without buttons (numeric mode)</ h3 >
180+ < ui5-step-input id ="stepInputNumericMode "
181+ class ="stepinput2auto "
182+ hide-step-buttons
183+ > </ ui5-step-input >
184+
179185 < section >
180186 < h3 > Form validation</ h3 >
181187 < form id ="formValidation ">
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ slug: ../StepInput
44
55import Basic from " ../../_samples/main/StepInput/Basic/Basic.md" ;
66import ValuePrecision from " ../../_samples/main/StepInput/ValuePrecision/ValuePrecision.md" ;
7+ import Numeric from " ../../_samples/main/StepInput/Numeric/Numeric.md" ;
78import MinMax from " ../../_samples/main/StepInput/MinMax/MinMax.md" ;
89import States from " ../../_samples/main/StepInput/States/States.md" ;
910
@@ -19,6 +20,9 @@ import States from "../../_samples/main/StepInput/States/States.md";
1920### Min Max
2021<MinMax />
2122
23+ ### Numeric Mode
24+ <Numeric />
25+
2226### Value Precision
2327<ValuePrecision />
2428
Original file line number Diff line number Diff line change 1+ import html from '!!raw-loader!./sample.html';
2+ import js from '!!raw-loader!./main.js';
3+ import react from '!!raw-loader!./sample.tsx';
4+
5+ <Editor html ={html} js ={js} react ={react} />
Original file line number Diff line number Diff line change 1+ import "@ui5/webcomponents/dist/StepInput.js" ;
Original file line number Diff line number Diff line change 1+ <!-- playground-fold -->
2+ <!DOCTYPE html>
3+ < html lang ="en ">
4+ < head >
5+ < meta charset ="UTF-8 ">
6+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 ">
7+ < title > Sample</ title >
8+ </ head >
9+ < body style ="background-color: var(--sapBackgroundColor); ">
10+ < div style ="width: 15rem; height: 70px ">
11+ <!-- playground-fold-end -->
12+
13+ < ui5-step-input value ="5 " min ="0 " max ="10 " step ="0.5 " value-precision ="1 " hide-step-buttons > </ ui5-step-input >
14+ <!-- playground-fold -->
15+ </ div >
16+ < script type ="module " src ="main.js "> </ script >
17+ </ body >
18+ </ html >
19+ <!-- playground-fold-end -->
20+
Original file line number Diff line number Diff line change 1+ import createReactComponent from "@ui5/webcomponents-base/dist/createReactComponent.js" ;
2+ import StepInputClass from "@ui5/webcomponents/dist/StepInput.js" ;
3+
4+ const StepInput = createReactComponent ( StepInputClass ) ;
5+
6+ function App ( ) {
7+ return (
8+ < StepInput value = { 5 } min = { 0 } max = { 10 } step = { 0.5 } valuePrecision = { 1 } hideStepButtons = { true } />
9+ ) ;
10+ }
11+
12+ export default App ;
You can’t perform that action at this time.
0 commit comments