dify icon indicating copy to clipboard operation
dify copied to clipboard

Knowledge Nav cannot be switched

Open junjiem opened this issue 8 months ago • 1 comments

Self Checks

  • [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [x] Please do not modify this template :) and fill in all the required fields.

Dify version

1.2+

Cloud or Self Hosted

Cloud, Self Hosted (Docker), Self Hosted (Source)

Steps to reproduce

Starting from version 1.2.0, Knowledge Nav cannot be switched.

Image

✔️ Expected Behavior

No response

❌ Actual Behavior

No response

junjiem avatar Apr 28 '25 09:04 junjiem

The issue you're experiencing with the Knowledge Nav not being switchable starting from version 1.2.0 might be related to how the dropdown menu is populated and controlled. The dropdown menu for Knowledge Nav is populated by the items prop, which is an array of ApiItem objects. The behavior of the dropdown is controlled by the isOpen state, which toggles the visibility of the dropdown menu. The handleSelect function is used to select an item from the dropdown, updating the selectedItem state and calling the onSelect callback with the selected item [1].

To diagnose the issue, you might want to check if there are any changes in the state management or API calls related to the dropdown menu in version 1.2.0. Additionally, ensure that the items prop is correctly populated and that the handleSelect function is functioning as expected. If there are any error handling or logging mechanisms in place, reviewing those logs might provide further insights into the problem.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

dosubot[bot] avatar Apr 28 '25 09:04 dosubot[bot]