update editor and components
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 3s
All checks were successful
Deploy Docs to Synology / deploy (push) Successful in 3s
This commit is contained in:
@@ -48,8 +48,7 @@ export const Autocomplete = ({ items, value, onselect, placeholder = 'Buscar...'
|
||||
onclick: () => pick(item),
|
||||
onmouseenter: () => cursor(idx)
|
||||
}, getBy(item))
|
||||
]),
|
||||
(item, idx) => getBy(item) + idx
|
||||
])
|
||||
),
|
||||
() => filtered().length === 0
|
||||
? h('li', { class: 'p-4 opacity-50 text-center' }, 'Sin resultados')
|
||||
|
||||
@@ -18,8 +18,7 @@ export const Select = (props) => {
|
||||
const value = typeof item === "string" ? item : item.value;
|
||||
const label = typeof item === "string" ? item : item.label;
|
||||
return h("option", { value }, label);
|
||||
},
|
||||
keyFn || ((item) => (typeof item === "string" ? item : item.value))
|
||||
}
|
||||
);
|
||||
|
||||
const options = placeholderOption
|
||||
|
||||
@@ -59,8 +59,7 @@ export const Fileinput = (props) => {
|
||||
class: "btn btn-ghost btn-xs btn-circle",
|
||||
onclick: (e) => { e.preventDefault(); removeFile(idx); }
|
||||
}, h("span", { class: "icon-[lucide--x]" }))
|
||||
]),
|
||||
(file) => file.name + file.lastModified
|
||||
])
|
||||
)
|
||||
])
|
||||
)
|
||||
|
||||
@@ -7,7 +7,7 @@ export const Menu = (props, children) => {
|
||||
};
|
||||
|
||||
export const MenuItems = (props) => {
|
||||
const { items, keyFn = (item, idx) => item.id ?? idx } = props;
|
||||
const { items } = props;
|
||||
const itemsSignal = typeof items === "function" ? items : () => items || [];
|
||||
|
||||
const renderItem = (item) => {
|
||||
@@ -28,5 +28,5 @@ export const MenuItems = (props) => {
|
||||
}, item.label));
|
||||
};
|
||||
|
||||
return each(itemsSignal, renderItem, keyFn);
|
||||
return each(itemsSignal, renderItem);
|
||||
};
|
||||
@@ -23,8 +23,7 @@ export const TableItems = (props) => {
|
||||
const content = col.render ? col.render(item, idx) : item[col.key];
|
||||
return h("td", { class: col.class }, content);
|
||||
})
|
||||
)
|
||||
, props.keyFn || ((item, idx) => item.id ?? idx))
|
||||
))
|
||||
]);
|
||||
|
||||
return [thead, tbody];
|
||||
|
||||
@@ -43,7 +43,6 @@ export const TabItems = (props) => {
|
||||
style: () => `display: ${props.activeIndex() === idx ? "block" : "none"};`
|
||||
}, typeof item.content === "function" ? item.content() : item.content)
|
||||
];
|
||||
},
|
||||
(item, idx) => item.id ?? idx
|
||||
}
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user