Packages

  • package root
    Definition Classes
    root
  • package net
    Definition Classes
    root
  • package wiringbits
    Definition Classes
    net
  • package webapp
    Definition Classes
    wiringbits
  • package utils
    Definition Classes
    webapp
  • package slinkyUtils
    Definition Classes
    utils
  • package components
    Definition Classes
    slinkyUtils
  • package core
    Definition Classes
    components
  • object AsyncComponent

    A reusable component to renders data from a asynchronous data source, providing:

    A reusable component to renders data from a asynchronous data source, providing:

    • A progress indicator when the data is being retrieved.
    • Invoking the render function when the data is available, to render such data.
    • Displaying an error message when retrieving the data has failed, as well as displaying a retry button so that the user is able to try again.
    Definition Classes
    core
  • DataState
  • Props

case class Props[D](fetch: () => Future[D], render: (D) => ReactElement, onDataLoaded: (D) => Unit = (_: D) => (), progressIndicator: () => ReactElement = () => loader, progressIndicatorWhileReloadingData: Boolean = false, retryLabel: String = "Retry", watchedObjects: Iterable[Any] = List("")) extends Product with Serializable

fetch

the function to fetch the data

render

the function to render the data once it is available

onDataLoaded

a function invoked when the remote data has been loaded

progressIndicator

the component rendered when the data is being loaded

progressIndicatorWhileReloadingData

whether to display the progress indicator every time the data is being reloaded

retryLabel

the label to use in the button that retries the operation

watchedObjects

objects being watched, when any of those changes, the data is loaded again

Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Props
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Props(fetch: () => Future[D], render: (D) => ReactElement, onDataLoaded: (D) => Unit = (_: D) => (), progressIndicator: () => ReactElement = () => loader, progressIndicatorWhileReloadingData: Boolean = false, retryLabel: String = "Retry", watchedObjects: Iterable[Any] = List(""))

    fetch

    the function to fetch the data

    render

    the function to render the data once it is available

    onDataLoaded

    a function invoked when the remote data has been loaded

    progressIndicator

    the component rendered when the data is being loaded

    progressIndicatorWhileReloadingData

    whether to display the progress indicator every time the data is being reloaded

    retryLabel

    the label to use in the button that retries the operation

    watchedObjects

    objects being watched, when any of those changes, the data is loaded again

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. val fetch: () => Future[D]
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. val onDataLoaded: (D) => Unit
  15. def productElementNames: Iterator[String]
    Definition Classes
    Product
  16. val progressIndicator: () => ReactElement
  17. val progressIndicatorWhileReloadingData: Boolean
  18. val render: (D) => ReactElement
  19. val retryLabel: String
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  24. val watchedObjects: Iterable[Any]

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped