pub struct FileUploadProps {Show 14 fields
pub accept: Option<String>,
pub max_size_mb: Option<f64>,
pub max_files: usize,
pub multiple: bool,
pub single: bool,
pub on_upload: EventHandler<Vec<UploadedFile>>,
pub on_change: Option<EventHandler<Vec<UploadedFile>>>,
pub label: Option<String>,
pub helper_text: Option<String>,
pub error: Option<String>,
pub loading: bool,
pub disabled: bool,
pub class: Option<String>,
pub show_file_list: bool,
}Expand description
File upload properties
Fields§
§accept: Option<String>Accepted file types (MIME types or extensions, e.g., “image/*”, “.pdf”)
max_size_mb: Option<f64>Maximum file size in MB
max_files: usizeMaximum number of files
multiple: boolMultiple files allowed
single: boolSingle file mode (alias for !multiple)
on_upload: EventHandler<Vec<UploadedFile>>Upload handler
on_change: Option<EventHandler<Vec<UploadedFile>>>Change handler (called when files are selected)
label: Option<String>Label
helper_text: Option<String>Helper text
error: Option<String>Error message
loading: boolLoading state
disabled: boolDisabled state
class: Option<String>Additional CSS classes
show_file_list: boolShow file list
Implementations§
Source§impl FileUploadProps
impl FileUploadProps
Sourcepub fn builder() -> FileUploadPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> FileUploadPropsBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building FileUploadProps.
On the builder, call .accept(...)(optional), .max_size_mb(...)(optional), .max_files(...)(optional), .multiple(...)(optional), .single(...)(optional), .on_upload(...), .on_change(...)(optional), .label(...)(optional), .helper_text(...)(optional), .error(...)(optional), .loading(...)(optional), .disabled(...)(optional), .class(...)(optional), .show_file_list(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of FileUploadProps.
Trait Implementations§
Source§impl Clone for FileUploadProps
impl Clone for FileUploadProps
Source§fn clone(&self) -> FileUploadProps
fn clone(&self) -> FileUploadProps
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more