Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
refactor(web): migrate webhook table input (#41612)
yyhea98d38c3d9c
diff --git a/oxlint-suppressions.json b/oxlint-suppressions.jsonindex 486baa63b5d..13bfe2fc84c 100644--- a/oxlint-suppressions.json+++ b/oxlint-suppressions.json@@ -4335,11 +4335,6 @@"count": 4}},- "web/app/components/workflow/nodes/trigger-webhook/components/generic-table.tsx": {- "no-restricted-imports": {- "count": 1- }- },"web/app/components/workflow/nodes/trigger-webhook/components/parameter-table.tsx": {"typescript/no-non-null-asserted-optional-chain": {"count": 1diff --git a/web/app/components/workflow/nodes/trigger-webhook/components/__tests__/generic-table.spec.tsx b/web/app/components/workflow/nodes/trigger-webhook/components/__tests__/generic-table.spec.tsxindex 9c2b1874db2..a74672c430b 100644--- a/web/app/components/workflow/nodes/trigger-webhook/components/__tests__/generic-table.spec.tsx+++ b/web/app/components/workflow/nodes/trigger-webhook/components/__tests__/generic-table.spec.tsx@@ -82,7 +82,9 @@ describe('GenericTable', () => {/>,)- fireEvent.change(screen.getByRole('textbox'), { target: { value: 'my key' } })+ fireEvent.change(screen.getByRole('textbox', { name: 'Name' }), {+ target: { value: 'my key' },+ })expect(onChange).toHaveBeenLastCalledWith([{ name: 'my_key', enabled: false }])})@@ -102,7 +104,7 @@ describe('GenericTable', () => {/>,)- const inputs = screen.getAllByRole('textbox')+ const inputs = screen.getAllByRole('textbox', { name: 'Name' })expect(inputs).toHaveLength(3)expect(screen.getAllByRole('button', { name: 'Delete row' })).toHaveLength(2)diff --git a/web/app/components/workflow/nodes/trigger-webhook/components/generic-table.tsx b/web/app/components/workflow/nodes/trigger-webhook/components/generic-table.tsxindex 4aece5b7352..51b7421c4a9 100644--- a/web/app/components/workflow/nodes/trigger-webhook/components/generic-table.tsx+++ b/web/app/components/workflow/nodes/trigger-webhook/components/generic-table.tsx@@ -2,6 +2,7 @@import type { FC, ReactNode } from 'react'import { Checkbox } from '@langgenius/dify-ui/checkbox'import { cn } from '@langgenius/dify-ui/cn'+import { Input } from '@langgenius/dify-ui/input'import {Select,SelectItem,@@ -16,7 +17,6 @@ import {import { RiDeleteBinLine } from '@remixicon/react'import * as React from 'react'import { useCallback, useMemo } from 'react'-import Input from '@/app/components/base/input'import { replaceSpaceWithUnderscoreInVarNameInput } from '@/utils/var'// Tiny utility to judge whether a cell value is effectively present@@ -110,6 +110,7 @@ const renderInputCell = () => {return (<Input+ aria-label={column.title}value={(value as string) || ''}onChange={(e) => {if (column.key === 'key' || column.key === 'name')@@ -124,9 +125,8 @@ const renderInputCell = (}}placeholder={column.placeholder}disabled={readonly}- wrapperClassName="w-full min-w-0"className={cn(- 'h-6 rounded-none border-0 bg-transparent p-0 shadow-none',+ 'h-6 min-w-0 rounded-none border-0 bg-transparent p-0 shadow-none','hover:border-transparent hover:bg-transparent focus:border-transparent focus:bg-transparent','system-sm-regular text-text-secondary placeholder:text-text-quaternary',)}