[−][src]Trait kayrx_ui::fabric::Component
An interface of a UI-component. Uses self
as a model.
Associated Types
type Message: 'static
Control message type which update
loop get.
type Properties: Properties
Properties type of component implementation.
Required methods
fn create(props: Self::Properties, link: Scope<Self>) -> Self
Initialization routine which could use a context.
fn update(&mut self, msg: Self::Message) -> bool
Called everytime when a messages of Msg
type received. It also takes a
reference to a context.
fn view(&self) -> VNode
Called by rendering loop.
Provided methods
fn mounted(&mut self) -> bool
Called after the component has been attached to the VDOM and it is safe to receive messages from agents but before the browser updates the screen. If true is returned, the view will be re-rendered and the user will not see the initial render.
fn change(&mut self, _props: Self::Properties) -> bool
Called when the component's parent component re-renders and the
component's place in the DOM tree remains unchanged. If the component's
place in the DOM tree changes, calling this method is unnecessary as the
component is recreated from scratch. It defaults to true if not implemented
and Self::Properties is not the unit type ()
.
fn destroy(&mut self)
Called for finalization on the final point of the component's lifetime.
Implementors
impl Component for Button
[src]
type Message = Msg
type Properties = Props
fn create(props: Self::Properties, _: ComponentLink<Self>) -> Self
[src]
fn update(&mut self, _: Self::Message) -> ShouldRender
[src]
fn change(&mut self, props: Self::Properties) -> ShouldRender
[src]
fn view(&self) -> Html
[src]
impl Component for FileDropArea
[src]
type Message = Msg
type Properties = Props
fn create(props: Self::Properties, link: ComponentLink<Self>) -> Self
[src]
fn update(&mut self, msg: Self::Message) -> ShouldRender
[src]
fn change(&mut self, props: Self::Properties) -> ShouldRender
[src]
fn view(&self) -> Html
[src]
impl Component for FileUpload
[src]
type Message = Msg
type Properties = Props
fn create(props: Self::Properties, link: ComponentLink<Self>) -> Self
[src]
fn update(&mut self, msg: Self::Message) -> ShouldRender
[src]
fn change(&mut self, props: Self::Properties) -> ShouldRender
[src]
fn view(&self) -> Html
[src]
impl Component for InputNumber
[src]
type Message = Msg
type Properties = Props
fn create(props: Self::Properties, link: ComponentLink<Self>) -> Self
[src]
fn update(&mut self, msg: Self::Message) -> ShouldRender
[src]
fn change(&mut self, props: Self::Properties) -> ShouldRender
[src]
fn view(&self) -> Html
[src]
impl Component for InputText
[src]
type Message = ()
type Properties = Props
fn create(props: Self::Properties, _: ComponentLink<Self>) -> Self
[src]
fn update(&mut self, _: Self::Message) -> ShouldRender
[src]
fn change(&mut self, props: Self::Properties) -> ShouldRender
[src]
fn view(&self) -> Html
[src]
impl Component for Label
[src]
type Message = ()
type Properties = Props
fn create(props: Self::Properties, _: ComponentLink<Self>) -> Self
[src]
fn update(&mut self, _: Self::Message) -> ShouldRender
[src]
fn change(&mut self, props: Self::Properties) -> ShouldRender
[src]
fn view(&self) -> Html
[src]
impl Component for Navbar
[src]
type Message = Msg
type Properties = Props
fn create(props: Self::Properties, link: ComponentLink<Self>) -> Self
[src]
fn update(&mut self, msg: Self::Message) -> ShouldRender
[src]
fn change(&mut self, props: Self::Properties) -> ShouldRender
[src]
fn view(&self) -> Html
[src]
impl Component for Pagination
[src]
type Message = Msg
type Properties = Props
fn create(props: Self::Properties, link: ComponentLink<Self>) -> Self
[src]
fn change(&mut self, props: Self::Properties) -> ShouldRender
[src]
fn update(&mut self, msg: Self::Message) -> ShouldRender
[src]
fn view(&self) -> Html
[src]
impl Component for kayrx_ui::widget::Select
[src]
type Message = ()
type Properties = Props
fn create(props: Self::Properties, _: ComponentLink<Self>) -> Self
[src]
fn update(&mut self, _: Self::Message) -> ShouldRender
[src]
fn change(&mut self, props: Self::Properties) -> ShouldRender
[src]
fn view(&self) -> Html
[src]
impl Component for Toast
[src]
type Message = Msg
type Properties = Props
fn create(props: Self::Properties, link: ComponentLink<Self>) -> Toast
[src]
fn update(&mut self, msg: Self::Message) -> ShouldRender
[src]
fn view(&self) -> Html
[src]
impl<T> Component for kayrx_ui::fabric::components::Select<T> where
T: ToString + PartialEq<T> + Clone + 'static,
[src]
T: ToString + PartialEq<T> + Clone + 'static,
type Message = Msg
type Properties = Props<T>
fn create(
props: <Select<T> as Component>::Properties,
link: Scope<Select<T>>
) -> Select<T>
[src]
props: <Select<T> as Component>::Properties,
link: Scope<Select<T>>
) -> Select<T>