mirror of
https://github.com/IRBorisov/ConceptPortal.git
synced 2025-06-26 13:00:39 +03:00
Small UI fixes
This commit is contained in:
parent
d7761060e7
commit
545bd97570
|
@ -31,11 +31,17 @@ function EditorLibraryItem({ item, isModified }: EditorLibraryItemProps) {
|
||||||
const ownerSelector = useDropdown();
|
const ownerSelector = useDropdown();
|
||||||
const onSelectUser = useCallback(
|
const onSelectUser = useCallback(
|
||||||
(newValue: UserID) => {
|
(newValue: UserID) => {
|
||||||
console.log(newValue);
|
|
||||||
ownerSelector.hide();
|
ownerSelector.hide();
|
||||||
if (newValue === item?.owner) {
|
if (newValue === item?.owner) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (
|
||||||
|
!window.confirm(
|
||||||
|
'Вы уверены, что хотите изменить владельца? Вы потеряете право управления данной схемой. Данное действие отменить нельзя'
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
controller.setOwner(newValue);
|
controller.setOwner(newValue);
|
||||||
},
|
},
|
||||||
[controller, item?.owner, ownerSelector]
|
[controller, item?.owner, ownerSelector]
|
||||||
|
|
|
@ -34,7 +34,6 @@ function ConstituentsTable({ items, activeCst, onOpenEdit, maxHeight, denseThres
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
const element = document.getElementById(`${prefixes.cst_side_table}${activeCst.alias}`);
|
const element = document.getElementById(`${prefixes.cst_side_table}${activeCst.alias}`);
|
||||||
console.log(element);
|
|
||||||
if (element) {
|
if (element) {
|
||||||
element.scrollIntoView({
|
element.scrollIntoView({
|
||||||
behavior: 'smooth',
|
behavior: 'smooth',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user