[PR #25031] fix: Boolean type control is not displayed #30895

Closed
opened 2026-02-21 20:48:26 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/25031

State: closed
Merged: Yes


Fixes #24979

Summary

This pull request makes a small update to the input type handling logic in the workflow form components. Specifically, it removes support for switching boolean input types and eliminates the mapping of boolean types to checkboxes.

  • Input type mapping update:

    • Removed the case that mapped the 'boolean' type to a 'checkbox' in the toType utility function (web/app/components/tools/utils/to-form-schema.ts).
  • Form input UI logic update:

    • Updated the FormInputItem component to prevent showing the type switch for boolean fields (web/app/components/workflow/nodes/_base/components/form-input-item.tsx).

Screenshots

Before After
CleanShot 2025-09-03 at 09 52 42@2x CleanShot 2025-09-03 at 09 52 56@2x

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
**Original Pull Request:** https://github.com/langgenius/dify/pull/25031 **State:** closed **Merged:** Yes --- Fixes #24979 ## Summary This pull request makes a small update to the input type handling logic in the workflow form components. Specifically, it removes support for switching boolean input types and eliminates the mapping of boolean types to checkboxes. - Input type mapping update: * Removed the case that mapped the `'boolean'` type to a `'checkbox'` in the `toType` utility function (`web/app/components/tools/utils/to-form-schema.ts`). - Form input UI logic update: * Updated the `FormInputItem` component to prevent showing the type switch for boolean fields (`web/app/components/workflow/nodes/_base/components/form-input-item.tsx`). ## Screenshots | Before | After | |--------|-------| | <img width="1102" height="510" alt="CleanShot 2025-09-03 at 09 52 42@2x" src="https://github.com/user-attachments/assets/70ba5d94-857e-4925-b8af-1f39d5ff87ec" />| <img width="1104" height="504" alt="CleanShot 2025-09-03 at 09 52 56@2x" src="https://github.com/user-attachments/assets/b2785b60-ea9a-442d-8da7-52257dde1e10" />| ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs) - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!) - [x] I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change. - [x] I've updated the documentation accordingly. - [x] I ran `dev/reformat`(backend) and `cd web && npx lint-staged`(frontend) to appease the lint gods
yindo added the pull-request label 2026-02-21 20:48:26 -05:00
yindo closed this issue 2026-02-21 20:48:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#30895