button function false #13469

Closed
opened 2026-02-21 19:12:18 -05:00 by yindo · 1 comment
Owner

Originally created by @Wystan0608 on GitHub (Apr 28, 2025).

Self Checks

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

Dify version

1.3.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Image

As shown in the picture, no matter which "Del" button you click, it always deletes the last classic item.

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @Wystan0608 on GitHub (Apr 28, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.3.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ![Image](https://github.com/user-attachments/assets/3cd0a267-5cbd-41aa-a229-038ac453c46a) As shown in the picture, no matter which "Del" button you click, it always deletes the last classic item. ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-21 19:12:18 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Apr 28, 2025):

The issue where clicking any "Del" button always deletes the last category item instead of the selected one is not present in the provided code. The handleRemoveClass function correctly uses the index parameter to remove the item at the specified index from the list. This function is correctly passed to each Item component in the list.map function, ensuring that the correct item is removed based on the index [1].

If the issue persists, it may be due to other parts of the application not included in the context. You might want to check if there are any event listeners or handlers that could interfere with the handleRemoveClass function's execution, or if there are any parts of the application that modify the index or list before the handleRemoveClass function is called.

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] commented on GitHub (Apr 28, 2025): <!-- Answer --> The issue where clicking any "Del" button always deletes the last category item instead of the selected one is not present in the provided code. The `handleRemoveClass` function correctly uses the `index` parameter to remove the item at the specified index from the list. This function is correctly passed to each `Item` component in the `list.map` function, ensuring that the correct item is removed based on the index <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/workflow/nodes/question-classifier/components/class-list.tsx)</sup>. If the issue persists, it may be due to other parts of the application not included in the context. You might want to check if there are any event listeners or handlers that could interfere with the `handleRemoveClass` function's execution, or if there are any parts of the application that modify the `index` or `list` before the `handleRemoveClass` function is called. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/e9ac9098-588a-4f24-b240-942e913e0c95?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/e9ac9098-588a-4f24-b240-942e913e0c95?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/e9ac9098-588a-4f24-b240-942e913e0c95?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/e9ac9098-588a-4f24-b240-942e913e0c95?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/e9ac9098-588a-4f24-b240-942e913e0c95?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/e9ac9098-588a-4f24-b240-942e913e0c95?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/e9ac9098-588a-4f24-b240-942e913e0c95?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#13469