refactor: refactor popper

This commit is contained in:
QiShaoXuan
2022-08-12 18:49:47 +08:00
parent 82c3d773d6
commit f16bfecab8
8 changed files with 188 additions and 205 deletions
@@ -91,7 +91,7 @@ export const PendantHistoryPanel = ({
return (
<Popover
key={item.id}
ref={ref => {
popperHandlerRef={ref => {
popoverHandlerRef.current[item.id] = ref;
}}
placement="bottom-start"
@@ -17,7 +17,7 @@ export const PendantPopover = (
const popoverHandlerRef = useRef<PopperHandler>();
return (
<Popover
ref={popoverHandlerRef}
popperHandlerRef={popoverHandlerRef}
pointerEnterDelay={300}
pointerLeaveDelay={200}
placement="bottom-start"
@@ -56,7 +56,7 @@ export const PendantRender = ({ block }: { block: AsyncBlock }) => {
return (
<Popover
ref={ref => {
popperHandlerRef={ref => {
popoverHandlerRef.current[id] = ref;
}}
container={blockRenderContainerRef.current}
@@ -107,7 +107,7 @@ export const PendantRender = ({ block }: { block: AsyncBlock }) => {
iconStyle={{ marginTop: 4 }}
trigger="click"
// trigger={isKanbanView ? 'hover' : 'click'}
container={blockRenderContainerRef.current}
// container={blockRenderContainerRef.current}
/>
</div>
</MuiFade>