Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
This DndListsParent // link to Compoent storing arrays
Group string
FieldName string
Events EventsHandlers
Tag string
ItemTag string
GroupClass string
PreviewClass string // class for the dragging item preview
PlaceholderClass string // class for the dragging item placeholder
}
Config dnd-lists config
type DndListsParent ¶
type EventsHandlers ¶
type EventsHandlers struct {
Started func(event StartedEvent) (bool, error)
Entered func(event EnteredEvent) (bool, error)
Leaved func(event LeavedEvent) error
Ended func(event StandardEvent) error
Added func(event StandardEvent) error
Updated func(event StandardEvent) error
Removed func(event RemovedEvent) error
Moved func(event StandardEvent) error
}
EventHandlers struct for unit all event handlers. see events.md
Event types:
| Name | Timing | Structure | |-----------|----------------------------------------------------|-----------------| | started | Element is chosen by user (return true for block) | StartedEvent | | entered | on dragenter (return true for block entering) | EnteredEvent | | leaved | on dragleave | LeavedEvent | | ended | Element dragging ended | StandardEvent | | added | Element is dropped into the list from another list | StandardEvent | | updated | When dragging element changes position | StandardEvent | | removed | Element is removed from the list into another list | RemovedEvent | | moved | When you move an item in the list or between lists | StandardEvent |