pub struct FileUploadInputProps {Show 13 fields
pub name: String,
pub value: Signal<FieldValue>,
pub _on_change: Callback<FieldValue>,
pub required: Option<bool>,
pub disabled: Option<bool>,
pub class: Option<String>,
pub error: Option<String>,
pub _has_error: Option<bool>,
pub constraints: Option<FileConstraints>,
pub max_files: Option<usize>,
pub show_preview: Option<bool>,
pub show_progress: Option<bool>,
pub multiple: Option<bool>,
}Expand description
Props for the FileUploadInput component.
File upload input component with drag and drop support
ยงRequired Props
- name:
impl Into<String>- Field name for the input
- value:
impl Into<Signal<FieldValue>>- Current value of the field
- _on_change:
impl Into<Callback<FieldValue>>- Callback when the value changes
ยงOptional Props
- required:
bool- Whether the field is required
- disabled:
bool- Whether the field is disabled
- class:
impl Into<String>- CSS classes
- error:
impl Into<String>- Error message to display
- _has_error:
bool- Whether the field has an error
- constraints:
FileConstraints- File constraints (types, size limits, etc.)
- max_files:
usize- Maximum number of files allowed
- show_preview:
bool- Whether to show file preview
- show_progress:
bool- Whether to show upload progress
- multiple:
bool- Whether to allow multiple file selection
Fieldsยง
ยงname: StringField name for the input
value: Signal<FieldValue>Current value of the field
_on_change: Callback<FieldValue>Callback when the value changes
required: Option<bool>Whether the field is required
disabled: Option<bool>Whether the field is disabled
class: Option<String>CSS classes
error: Option<String>Error message to display
_has_error: Option<bool>Whether the field has an error
constraints: Option<FileConstraints>File constraints (types, size limits, etc.)
max_files: Option<usize>Maximum number of files allowed
show_preview: Option<bool>Whether to show file preview
show_progress: Option<bool>Whether to show upload progress
multiple: Option<bool>Whether to allow multiple file selection
Implementationsยง
Sourceยงimpl FileUploadInputProps
impl FileUploadInputProps
Sourcepub fn builder() -> FileUploadInputPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> FileUploadInputPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building FileUploadInputProps.
On the builder, call .name(...), .value(...), ._on_change(...), .required(...)(optional), .disabled(...)(optional), .class(...)(optional), .error(...)(optional), ._has_error(...)(optional), .constraints(...)(optional), .max_files(...)(optional), .show_preview(...)(optional), .show_progress(...)(optional), .multiple(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of FileUploadInputProps.
Trait Implementationsยง
Auto Trait Implementationsยง
impl Freeze for FileUploadInputProps
impl RefUnwindSafe for FileUploadInputProps
impl Send for FileUploadInputProps
impl Sync for FileUploadInputProps
impl Unpin for FileUploadInputProps
impl UnsafeUnpin for FileUploadInputProps
impl UnwindSafe for FileUploadInputProps
Blanket Implementationsยง
Sourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more