select<T, V> static method
TFormField<V>
select<T, V>(
- TFieldProp<
V> prop, - String? label, {
- String? tag,
- String? placeholder,
- String? helperText,
- bool isRequired = false,
- bool disabled = false,
- List<
String? Function(V?)> ? rules, - List<
T> ? items, - ItemTextAccessor<
T> ? itemText, - ItemValueAccessor<
T, V> ? itemValue, - ItemChildrenAccessor<
T> ? itemChildren, - ItemKeyAccessor<
T> ? itemKey, - bool multiLevel = false,
- int itemsPerPage = 10,
- TLoadListener<
T> ? onLoad, - int searchDelay = 2500,
Implementation
static TFormField<V> select<T, V>(
TFieldProp<V> prop,
String? label, {
String? tag,
String? placeholder,
String? helperText,
bool isRequired = false,
bool disabled = false,
List<String? Function(V?)>? rules,
List<T>? items,
ItemTextAccessor<T>? itemText,
ItemValueAccessor<T, V>? itemValue,
ItemChildrenAccessor<T>? itemChildren,
ItemKeyAccessor<T>? itemKey,
bool multiLevel = false,
int itemsPerPage = 10,
TLoadListener<T>? onLoad,
int searchDelay = 2500,
}) {
return TFormField<V>(
prop: prop,
builder: (onValueChanged) => TSelect(
label: label,
tag: tag,
placeholder: placeholder,
helperText: helperText,
isRequired: isRequired,
disabled: disabled,
rules: rules,
value: prop.value,
valueNotifier: prop.valueNotifier,
onValueChanged: onValueChanged,
items: items,
itemText: itemText,
itemValue: itemValue,
itemChildren: itemChildren,
itemKey: itemKey,
multiLevel: multiLevel,
itemsPerPage: itemsPerPage,
onLoad: onLoad,
searchDelay: searchDelay,
),
);
}