Chore: Replace lodash/noop with lodash-es/noop (#22331)
This commit is contained in:
parent
1d54ffcf89
commit
8b1f428ead
3 changed files with 5 additions and 5 deletions
|
|
@ -55,7 +55,7 @@ type Props = {
|
||||||
value?: ToolValue
|
value?: ToolValue
|
||||||
selectedTools?: ToolValue[]
|
selectedTools?: ToolValue[]
|
||||||
onSelect: (tool: ToolValue) => void
|
onSelect: (tool: ToolValue) => void
|
||||||
onSelectMultiple: (tool: ToolValue[]) => void
|
onSelectMultiple?: (tool: ToolValue[]) => void
|
||||||
isEdit?: boolean
|
isEdit?: boolean
|
||||||
onDelete?: () => void
|
onDelete?: () => void
|
||||||
supportEnableSwitch?: boolean
|
supportEnableSwitch?: boolean
|
||||||
|
|
@ -143,7 +143,7 @@ const ToolSelector: FC<Props> = ({
|
||||||
}
|
}
|
||||||
const handleSelectMultipleTool = (tool: ToolDefaultValue[]) => {
|
const handleSelectMultipleTool = (tool: ToolDefaultValue[]) => {
|
||||||
const toolValues = tool.map(item => getToolValue(item))
|
const toolValues = tool.map(item => getToolValue(item))
|
||||||
onSelectMultiple(toolValues)
|
onSelectMultiple?.(toolValues)
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleDescriptionChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
|
const handleDescriptionChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import { useRenderI18nObject } from '@/hooks/use-i18n'
|
||||||
import type { NodeOutPutVar } from '../../../types'
|
import type { NodeOutPutVar } from '../../../types'
|
||||||
import type { Node } from 'reactflow'
|
import type { Node } from 'reactflow'
|
||||||
import type { PluginMeta } from '@/app/components/plugins/types'
|
import type { PluginMeta } from '@/app/components/plugins/types'
|
||||||
import { noop } from 'lodash'
|
import { noop } from 'lodash-es'
|
||||||
import { useDocLink } from '@/context/i18n'
|
import { useDocLink } from '@/context/i18n'
|
||||||
|
|
||||||
export type Strategy = {
|
export type Strategy = {
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import type { EditData } from './edit-card'
|
||||||
import { ArrayType, type Field, Type } from '../../../types'
|
import { ArrayType, type Field, Type } from '../../../types'
|
||||||
import Toast from '@/app/components/base/toast'
|
import Toast from '@/app/components/base/toast'
|
||||||
import { findPropertyWithPath } from '../../../utils'
|
import { findPropertyWithPath } from '../../../utils'
|
||||||
import _ from 'lodash'
|
import { noop } from 'lodash-es'
|
||||||
|
|
||||||
type ChangeEventParams = {
|
type ChangeEventParams = {
|
||||||
path: string[],
|
path: string[],
|
||||||
|
|
@ -21,7 +21,7 @@ type AddEventParams = {
|
||||||
|
|
||||||
export const useSchemaNodeOperations = (props: VisualEditorProps) => {
|
export const useSchemaNodeOperations = (props: VisualEditorProps) => {
|
||||||
const { schema: jsonSchema, onChange: doOnChange } = props
|
const { schema: jsonSchema, onChange: doOnChange } = props
|
||||||
const onChange = doOnChange || _.noop
|
const onChange = doOnChange || noop
|
||||||
const backupSchema = useVisualEditorStore(state => state.backupSchema)
|
const backupSchema = useVisualEditorStore(state => state.backupSchema)
|
||||||
const setBackupSchema = useVisualEditorStore(state => state.setBackupSchema)
|
const setBackupSchema = useVisualEditorStore(state => state.setBackupSchema)
|
||||||
const isAddingNewField = useVisualEditorStore(state => state.isAddingNewField)
|
const isAddingNewField = useVisualEditorStore(state => state.isAddingNewField)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue