Closed aixgeek closed 2 months ago
To fix the issue where the run panel appears in the wrong position after adding multiple outputs and scrolling the panel in the Dify application, you need to ensure that the height of the panel is adjusted correctly when the content changes.
In the provided code, the adjustResultHeight
function is responsible for setting the height of the panel. However, it is only called in the useEffect
hook that depends on the loading
state. You should also call this function whenever the content of the panel changes.
You can achieve this by adding a dependency on runDetail
in the useEffect
hook that calls adjustResultHeight
. Here is the modified code:
useEffect(() => {
adjustResultHeight()
}, [loading, runDetail])
This ensures that the height is adjusted whenever the runDetail
changes, which should fix the issue with the panel appearing in the wrong position.
Here is the updated part of the code:
useEffect(() => {
adjustResultHeight()
}, [loading, runDetail])
This change should ensure that the panel height is recalculated whenever the content changes, thus fixing the positioning issue [1][2].
To continue talking to Dosu, mention @dosu.
Self Checks
Dify version
0.6.11
Cloud or Self Hosted
Cloud, Self Hosted (Docker), Self Hosted (Source)
Steps to reproduce
Add multi outputs in panel and scroll panel Click run button,the run panel position is wrong.
✔️ Expected Behavior
❌ Actual Behavior