This commit is contained in:
Viet An
2026-07-03 10:22:08 +07:00
parent 4404c4654b
commit b06907097c
11 changed files with 107 additions and 111 deletions

View File

@@ -334,7 +334,7 @@ function addNew() {
}
function dataevent(v) {
console.log("SearchBox received dataevent:", v); // Debug log
// console.log("SearchBox received dataevent:", v); // Debug log
if (!v || !v.id) {
console.error("Invalid data received in SearchBox:", v);
@@ -346,11 +346,11 @@ function dataevent(v) {
if (idx < 0) {
// Nếu chưa có trong danh sách, thêm vào đầu
suggestions.value.unshift(v);
console.log("Added new item to data:", v);
// console.log("Added new item to data:", v);
} else {
// Nếu đã có, cập nhật
suggestions.value[idx] = v;
console.log("Updated existing item in data:", v);
// console.log("Updated existing item in data:", v);
}
// Cập nhật orgdata nếu có