This commit is contained in:
2026-04-06 18:07:39 +02:00
parent 294547fc56
commit 071a215393
80 changed files with 593 additions and 2085 deletions

View File

@@ -1,5 +1,5 @@
// components/Autocomplete.js
import { $, Tag, For } from "../sigpro.js";
// import { $, Tag, For } from "../sigpro.js";
import { val } from "../core/utils.js";
import { tt } from "../core/i18n.js";
import { Input } from "./Input.js";
@@ -15,7 +15,7 @@ import { Input } from "./Input.js";
* - z-50, active, bg-primary, text-primary-content
*/
export const Autocomplete = (props) => {
const { class: className, items = [], value, onSelect, label, placeholder, ...rest } = props;
const { class: className, items = [], value, onselect, label, placeholder, ...rest } = props;
const query = $(val(value) || "");
const isOpen = $(false);
@@ -35,7 +35,7 @@ export const Autocomplete = (props) => {
query(labelStr);
if (typeof value === "function") value(valStr);
onSelect?.(opt);
onselect?.(opt);
isOpen(false);
cursor(-1);