B: Fix RSForm editor layout
This commit is contained in:
parent
f86d847d64
commit
07974e3760
|
@ -49,7 +49,7 @@ function ToolbarConstituenta({
|
|||
const controller = useRSEdit();
|
||||
|
||||
return (
|
||||
<Overlay position='top-1 right-4' className='cc-icons sm:right-1/2 sm:translate-x-1/2'>
|
||||
<Overlay position='top-1 right-4' className='cc-icons md:right-1/2 md:translate-x-1/2 transition-all duration-500'>
|
||||
{controller.schema && controller.schema?.oss.length > 0 ? (
|
||||
<MiniSelectorOSS
|
||||
items={controller.schema.oss}
|
||||
|
|
|
@ -17,6 +17,7 @@ interface TableSideConstituentsProps {
|
|||
activeCst?: IConstituenta;
|
||||
onOpenEdit: (cstID: ConstituentaID) => void;
|
||||
denseThreshold?: number;
|
||||
autoScroll?: boolean;
|
||||
maxHeight: string;
|
||||
}
|
||||
|
||||
|
@ -25,6 +26,7 @@ const columnHelper = createColumnHelper<IConstituenta>();
|
|||
function TableSideConstituents({
|
||||
items,
|
||||
activeCst,
|
||||
autoScroll = true,
|
||||
onOpenEdit,
|
||||
maxHeight,
|
||||
denseThreshold = 9999
|
||||
|
@ -38,6 +40,7 @@ function TableSideConstituents({
|
|||
if (!activeCst) {
|
||||
return;
|
||||
}
|
||||
if (autoScroll) {
|
||||
setTimeout(() => {
|
||||
const element = document.getElementById(`${prefixes.cst_side_table}${activeCst.alias}`);
|
||||
if (element) {
|
||||
|
@ -48,7 +51,8 @@ function TableSideConstituents({
|
|||
});
|
||||
}
|
||||
}, PARAMETER.refreshTimeout);
|
||||
}, [activeCst]);
|
||||
}
|
||||
}, [activeCst, autoScroll]);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
setColumnVisibility(prev => {
|
||||
|
|
|
@ -46,6 +46,7 @@ function ViewConstituents({ expression, schema, activeCst, isBottom, onOpenEdit
|
|||
items={filteredData}
|
||||
activeCst={activeCst}
|
||||
onOpenEdit={onOpenEdit}
|
||||
autoScroll={!isBottom}
|
||||
denseThreshold={COLUMN_EXPRESSION_HIDE_THRESHOLD}
|
||||
/>
|
||||
),
|
||||
|
@ -55,10 +56,10 @@ function ViewConstituents({ expression, schema, activeCst, isBottom, onOpenEdit
|
|||
return (
|
||||
<motion.div
|
||||
className={clsx(
|
||||
'border overflow-visible', // prettier: split-lines
|
||||
'border', // prettier: split-lines
|
||||
{
|
||||
'mt-[2.2rem] rounded-l-md rounded-r-none h-fit': !isBottom,
|
||||
'mt-3 mx-6 rounded-md md:w-[45.8rem]': isBottom
|
||||
'mt-[2.2rem] rounded-l-md rounded-r-none h-fit overflow-visible': !isBottom,
|
||||
'mt-3 mx-6 rounded-md md:max-w-[45.8rem] overflow-hidden': isBottom
|
||||
}
|
||||
)}
|
||||
initial={{ ...animateSideView.initial }}
|
||||
|
|
Loading…
Reference in New Issue
Block a user