@@ -21,7 +21,7 @@ import {
21
21
withExposingConfigs ,
22
22
} from "comps/generators/withExposing" ;
23
23
import { Section , sectionNames , ValueFromOption } from "lowcoder-design" ;
24
- import { useEffect , useRef , useState } from "react" ;
24
+ import { ReactNode , useEffect , useRef , useState } from "react" ;
25
25
import styled , { css } from "styled-components" ;
26
26
import { RecordConstructorToView } from "lowcoder-core" ;
27
27
import { InputEventHandlerControl } from "../../controls/eventHandlerControl" ;
@@ -259,6 +259,7 @@ const childrenMap = {
259
259
viewRef : RefControl < HTMLInputElement > ,
260
260
style : styleControl ( InputFieldStyle ) ,
261
261
labelStyle :styleControl ( LabelStyle ) ,
262
+ prefixText : stringExposingStateControl ( "defaultValue" ) ,
262
263
prefixIcon : IconControl ,
263
264
inputFieldStyle :styleControl ( InputLikeStyle ) ,
264
265
// validation
@@ -323,7 +324,7 @@ const CustomInputNumber = (props: RecordConstructorToView<typeof childrenMap>) =
323
324
stringMode = { true }
324
325
precision = { props . precision }
325
326
$style = { props . inputFieldStyle }
326
- prefix = { hasIcon ( props . prefixIcon ) && props . prefixIcon }
327
+ prefix = { hasIcon ( props . prefixIcon ) ? props . prefixIcon : props . prefixText . value }
327
328
onPressEnter = { ( ) => {
328
329
handleFinish ( ) ;
329
330
props . onEvent ( "submit" ) ;
@@ -420,6 +421,7 @@ let NumberInputTmpComp = (function () {
420
421
{ children . step . propertyView ( { label : trans ( "numberInput.step" ) } ) }
421
422
{ children . precision . propertyView ( { label : trans ( "numberInput.precision" ) } ) }
422
423
{ children . prefixIcon . propertyView ( { label : trans ( "button.prefixIcon" ) } ) }
424
+ { children . prefixText . propertyView ( { label : trans ( "button.prefixText" ) } ) }
423
425
{ children . allowNull . propertyView ( { label : trans ( "numberInput.allowNull" ) } ) }
424
426
{ children . thousandsSeparator . propertyView ( {
425
427
label : trans ( "numberInput.thousandsSeparator" ) ,
0 commit comments