Update new functions
This commit is contained in:
@@ -184,14 +184,14 @@ Input({
|
||||
const userId = $("123");
|
||||
const userData = $(null);
|
||||
|
||||
$watch(userId, async (id) => {
|
||||
Watch(userId, async (id) => {
|
||||
loading(true);
|
||||
userData(await fetch(`/api/user/${id}`).then(r => r.json()));
|
||||
loading(false);
|
||||
});
|
||||
|
||||
// In template
|
||||
$if(() => userData(), () => Alert({ type: "success" }, userData()?.name))
|
||||
If(() => userData(), () => Alert({ type: "success" }, userData()?.name))
|
||||
```
|
||||
|
||||
### Modal with Confirm Action
|
||||
|
||||
Reference in New Issue
Block a user