Fix uiWebsite updating
This commit is contained in:
parent
e710c441b1
commit
fc7a7aa54d
@ -59,6 +59,8 @@ class UIWebsiteManager {
|
||||
website.margin.right = websiteEvent.margin.right;
|
||||
}
|
||||
}
|
||||
|
||||
uiWebsitesStore.update(website);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,11 @@ function createUIWebsiteStore() {
|
||||
add: (uiWebsite: UIWebsite) => {
|
||||
update((currentArray) => [...currentArray, uiWebsite]);
|
||||
},
|
||||
update: (uiWebsite: UIWebsite) => {
|
||||
update((currentArray) =>
|
||||
currentArray.map((currentWebsite) => (currentWebsite.id === uiWebsite.id ? uiWebsite : currentWebsite))
|
||||
);
|
||||
},
|
||||
remove: (uiWebsite: UIWebsite) => {
|
||||
update((currentArray) => currentArray.filter((currentWebsite) => currentWebsite.id !== uiWebsite.id));
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user