Update docs

This commit is contained in:
Insality
2025-04-15 21:49:22 +03:00
parent e2c9a7d9d6
commit 9e2a14c6dd
48 changed files with 1097 additions and 1289 deletions

View File

@@ -2,14 +2,21 @@
> at /druid/base/back_handler.lua
The component that handles the back handler action, like backspace or android back button
Component to handle back button. It handles Android back button and Backspace key.
### Setup
Create back handler component with druid: `druid:new_back_handler(callback)`
### Notes
- Key triggers in `input.binding` should be setup for correct working
- It uses a key_back and key_backspace action ids
## Functions
- [init](#init)
## Fields
- [on_back](#on_back)
- [params](#params)
@@ -22,6 +29,8 @@ The component that handles the back handler action, like backspace or android ba
back_handler:init([callback], [params])
```
The Back Handler constructor
- **Parameters:**
- `[callback]` *(function|nil)*: The callback to call when the back handler is triggered
- `[params]` *(any)*: Custom args to pass in the callback