Updated
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user