Presto
GitHub
Getting Started
Guides
Packages
View Model
BaseViewModel
isViewModelClass
isViewModelInstance
viewModelFactory
Async Choices
AsyncChoices
AsyncChoicesInterface
useAsyncChoices
Caching
useViewModelCache
ViewModelCache
Errors
InvalidFieldError
MissingFieldsError
Fields
BooleanField
CharField
CurrencyField
DateField
DateRangeField
DateTimeField
DateTimeRangeField
DecimalField
DecimalRangeField
DurationField
EmailField
Field
FileField
FloatField
FloatRangeField
ImageField
IntegerField
IntegerRangeField
IPAddressField
JsonField
ListField
ManyRelatedViewModelField
NullableBooleanField
NumberField
PasswordField
RangeField
RelatedViewModelField
SlugField
TextField
TimeField
URLField
UUIDField
Utils
normalizeFields
ViewModelFieldPaths
Final Form
REST
Routing
UI
UI ANTD
Util
On this page
Methods
clone
contributeToClass
format
getFormatterProps
getWidgetProps
isEqual
normalize
parse
toJS
toString
Properties
asyncChoices
blank
blankAsNull
boundRecord
choices
defaultValue
formatterProps
helpText
isBound
label
model
name
readOnly
separator
value
widgetProps
writeOnly
Static Properties
fieldClassName
RangeField
Source
import { RangeField } from "@prestojs/viewmodel";
RangeField
<
T
>
Hierarchy
Field
<
T
>
RangeField
DateRangeField
DateTimeRangeField
DecimalRangeField
FloatRangeField
IntegerRangeField
API
Show inherited
Constructor
new RangeField
(
?values
)
Arguments:
Argument
Type
Description
values
RangeFieldProps
Methods
clone
()
Returns:
Field
contributeToClass
(
viewModel
)
Arguments:
Argument
Type
Description
*
viewModel
ViewModelConstructor
Returns:
void
format
(
value
)
Arguments:
Argument
Type
Description
*
value
T
Returns:
any
getFormatterProps
()
Returns:
{[fieldName: string]:
any
}
getWidgetProps
()
Returns:
{[fieldName: string]:
any
}
isEqual
(
value1
,
value2
)
Arguments:
Argument
Type
Description
*
value1
T
*
value2
T
Returns:
boolean
normalize
(
value
)
Arguments:
Argument
Type
Description
*
value
T
Returns:
null
|
T
parse
(
value
)
Arguments:
Argument
Type
Description
*
value
null
|
T
Returns:
null
|
T
toJS
(
value
)
Arguments:
Argument
Type
Description
*
value
T
Returns:
null
|
string
|
number
|
Record
toString
()
Returns:
string
Properties
asyncChoices
Source
AsyncChoicesInterface
blank
Source
boolean
blankAsNull
Source
boolean
boundRecord
Source
undefined
|
ViewModelInterface
choices
Source
Map
defaultValue
Source
undefined
|
null
|
T
|
Promise
formatterProps
Source
Record
helpText
Source
string
isBound
Source
boolean
label
Source
string
model
Source
ViewModelConstructor
name
Source
string
readOnly
Source
boolean
separator
Source
string
value
Source
undefined
|
T
widgetProps
Source
Record
writeOnly
Source
boolean
Static Properties
fieldClassName
Source
string