Dnd Drop Target Component
class DndDropTargetComponent<PAYLOAD : Any>(ctx: Ctx<DndDropTargetComponent.Props<PAYLOAD>>) : Component<DndDropTargetComponent.Props<PAYLOAD>>
Content copied to clipboard
Constructors
Link copied to clipboard
fun <PAYLOAD : Any> DndDropTargetComponent(ctx: Ctx<DndDropTargetComponent.Props<PAYLOAD>>)
Content copied to clipboard
Types
Link copied to clipboard
data class Props<PAYLOAD : Any>( val payloadType: KClass<PAYLOAD>, val accepts: (PAYLOAD) -> Boolean, val onDrop: (PAYLOAD) -> Unit, val onMouseOver: (target: Component<*>) -> Unit, val onMouseOut: (target: Component<*>) -> Unit, val onDragStart: (target: Component<*>) -> Unit, val onDragEnd: (target: Component<*>) -> Unit, val key: String?)
Content copied to clipboard
Functions
Link copied to clipboard
open fun shouldRedraw(nextProps: DndDropTargetComponent.Props<PAYLOAD>): Boolean
Content copied to clipboard
Returns 'true' when the component should redraw.
Link copied to clipboard
fun <T> subscribingTo(stream: Stream<T>, onNext: (T) -> Unit? = null): ReadOnlyProperty<Any?, T>
Content copied to clipboard
Creates a property that is subscribed to a stream.
Link copied to clipboard
Triggers a redraw
Properties
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val lifecycle: Component.LifeCycle<DndDropTargetComponent.Props<PAYLOAD>>
Content copied to clipboard
The life-cycle LifeCycle that the component exposes