Small UI fixes

This commit is contained in:
IRBorisov 2024-05-28 19:48:33 +03:00
parent d7761060e7
commit 545bd97570
2 changed files with 7 additions and 2 deletions

View File

@ -31,11 +31,17 @@ function EditorLibraryItem({ item, isModified }: EditorLibraryItemProps) {
const ownerSelector = useDropdown();
const onSelectUser = useCallback(
(newValue: UserID) => {
console.log(newValue);
ownerSelector.hide();
if (newValue === item?.owner) {
return;
}
if (
!window.confirm(
'Вы уверены, что хотите изменить владельца? Вы потеряете право управления данной схемой. Данное действие отменить нельзя'
)
) {
return;
}
controller.setOwner(newValue);
},
[controller, item?.owner, ownerSelector]

View File

@ -34,7 +34,6 @@ function ConstituentsTable({ items, activeCst, onOpenEdit, maxHeight, denseThres
}
setTimeout(() => {
const element = document.getElementById(`${prefixes.cst_side_table}${activeCst.alias}`);
console.log(element);
if (element) {
element.scrollIntoView({
behavior: 'smooth',