The ReorderHandle is an element that adds drag-and-drop functionality to other elements, and serves as a handle for moving items in a group of elements.
The sample shows the reorder handle in its simplest form, as a visual grip for moving an item.
By adding the lock attribute to the ReorderHandle element, you can block the ability to drag an item, preventing users from changing the order of items.
Elements can be moved within their parent container without the need to explicitly define a dropzone attribute, simplifying the implementation of drag-and-drop functionality.
Use wje-reorder-handle when you want to solve a given UI problem consistently within the WebJET design system.
Do not use a component outside of its responsibility; in an atypical case, prefer to assemble multiple smaller components.
Check keyboard controls, focus states, contrast and clear naming of interactive elements.
- Prefer API component over manual DOM interventions.
- Stick to design tokens and consistent naming conventions.
- Before deployment, test the component in real data scenarios.
| Popis | Riadi správanie voľby dropzone v komponente. |
| Atribút | dropzone |
| Typ | any |
| Predvolené | - |
| Popis | Riadi správanie voľby parent v komponente. |
| Atribút | parent |
| Typ | any |
| Predvolené | - |
| Názov | Popis |
|---|
wje-reorder-handle:start | Vyvolá sa pri odoslaní udalosti wje-reorder-handle:start. |
wje-reorder-handle:change | Vyvolá sa pri zmene hodnoty komponentu. |
| Popis | Spustí metódu startDrag na vykonanie logiky komponentu a aktualizáciu jeho stavu. |
| Signatúra | (e: DragEvent) => void |
| Popis | Spustí metódu startTouchDrag na vykonanie logiky komponentu a aktualizáciu jeho stavu. |
| Signatúra | (e: TouchEvent) => void |
| Popis | Spustí metódu startDragAction na vykonanie logiky komponentu a aktualizáciu jeho stavu. |
| Signatúra | (clientX: number, clientY: number) => void |
| Popis | Vráti draggable z aktuálneho stavu komponentu. |
| Signatúra | () => Element|null |
| Popis | Vráti dropzone z aktuálneho stavu komponentu. |
| Signatúra | (element: HTMLElement) => HTMLElement|null |
| Popis | Vráti closest dropzone z aktuálneho stavu komponentu. |
| Signatúra | (clientX: number, clientY: number) => HTMLElement|null |
| Popis | Vráti elements from point všetky z aktuálneho stavu komponentu. |
| Signatúra | (x: number, y: number, root?: Document|ShadowRoot, visited?: Set<Node>) => HTMLElement[] |
| Popis | Spustí metódu reIndexItems na vykonanie logiky komponentu a aktualizáciu jeho stavu. |
| Signatúra | (container: HTMLElement) => void |
| Názov | Popis |
|---|
native | Štýluje koreňovú shadow časť komponentu. |
Pre tento komponent nie sú dostupné žiadne vlastné CSS vlastnosti.
| Názov | Popis |
|---|
default | Predvolený slot pre hlavný obsah komponentu. |