Skip to content

Commit b454a7f

Browse files
committed
- Requested Changes
1 parent df38a03 commit b454a7f

File tree

10 files changed

+12
-16
lines changed

10 files changed

+12
-16
lines changed

client/packages/lowcoder/src/comps/comps/avatar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ const AvatarView = (props: RecordConstructorToView<typeof childrenMap>) => {
186186
shape={shape}
187187
$style={props.avatarStyle}
188188
src={src.value}
189-
onClick={() => handleClickEvent()}
189+
onClick={handleClickEvent}
190190
>
191191
{title.value}
192192
</AvatarWrapper>

client/packages/lowcoder/src/comps/comps/commentComp/commentComp.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ const CommentCompBase = (
179179
const generateCommentAvatar = (item: commentDataTYPE) => {
180180
return (
181181
<Avatar
182-
onClick={() => handleClickEvent()}
182+
onClick={handleClickEvent}
183183
// If there is an avatar, no background colour is set, and if displayName is not null, displayName is called using getInitialsAndColorCode
184184
style={{
185185
backgroundColor: item?.user?.avatar
@@ -296,7 +296,7 @@ const CommentCompBase = (
296296
avatar={generateCommentAvatar(item)}
297297
title={
298298
<div
299-
onClick={() => handleClickEvent()}
299+
onClick={handleClickEvent}
300300
>
301301
<a>{item?.user?.name}</a>
302302
<Tooltip

client/packages/lowcoder/src/comps/comps/containerComp/cardComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export const ContainerBaseComp = (function () {
239239
$cardType={props.cardType}
240240
onMouseEnter={() => props.onEvent('focus')}
241241
onMouseLeave={() => props.onEvent('blur')}
242-
onClick={() => handleClickEvent()}
242+
onClick={handleClickEvent}
243243
>
244244
<Card
245245
style={{ width: width, height: '100%' }}

client/packages/lowcoder/src/comps/comps/iconComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ const IconView = (props: RecordConstructorToView<typeof childrenMap>) => {
137137
$sourceMode={props.sourceMode}
138138
$animationStyle={props.animationStyle}
139139
style={style}
140-
onClick={() => handleClickEvent()}
140+
onClick={handleClickEvent}
141141
>
142142
{ props.sourceMode === 'standard'
143143
? (props.icon || '')

client/packages/lowcoder/src/comps/comps/imageComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ const ContainerImg = (props: RecordConstructorToView<typeof childrenMap>) => {
215215
draggable={false}
216216
preview={props.supportPreview ? {src: props.previewSrc || props.src.value } : false}
217217
fallback={DEFAULT_IMG_URL}
218-
onClick={() => handleClickEvent()}
218+
onClick={handleClickEvent}
219219
/>
220220
</div>
221221
</Container>

client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnAvatarsComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ const MemoizedAvatar = React.memo(({
120120

121121
// Then trigger main component event
122122
handleClickEvent()
123-
}, [onEvent, onItemEvent]);
123+
}, [onItemEvent, handleClickEvent]);
124124

125125
return (
126126
<Tooltip title={item.Tooltip} key={index}>

client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnDropdownComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const DropdownMenu = React.memo(({ items, options, onEvent }: { items: any[]; op
6262
item && options[itemIndex]?.onEvent("click");
6363
// Also trigger the dropdown's main event handler
6464
handleClickEvent();
65-
}, [items, options, onEvent]);
65+
}, [items, options, handleClickEvent]);
6666

6767
const handleMouseDown = useCallback((e: React.MouseEvent) => {
6868
e.stopPropagation();

client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/columnSelectComp.tsx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import { IconControl } from "comps/controls/iconControl";
66
import { MultiCompBuilder } from "comps/generators";
77
import { optionsControl } from "comps/controls/optionsControl";
88
import { disabledPropertyView, hiddenPropertyView } from "comps/utils/propertyUtils";
9-
109
import { trans } from "i18n";
1110
import { ColumnTypeCompBuilder, ColumnTypeViewFn } from "../columnTypeCompBuilder";
1211
import { ColumnValueTooltip } from "../simpleColumnTypeComps";
@@ -146,14 +145,11 @@ const SelectEdit = React.memo((props: SelectEditProps) => {
146145
if (!mountedRef.current) return;
147146
props.onChange(val);
148147
setCurrentValue(val);
148+
149149
// Trigger the specific option's event handler
150150
const selectedOption = props.options.find(option => option.value === val);
151151
if (selectedOption?.onEvent) {
152-
if (selectedOption.onEvent.isBind("click")) {
153-
selectedOption.onEvent("click");
154-
} else if (selectedOption.onEvent.isBind("doubleClick")) {
155-
selectedOption.onEvent("doubleClick");
156-
}
152+
selectedOption.onEvent("click");
157153
}
158154

159155
// Also trigger the main component's event handler

client/packages/lowcoder/src/comps/comps/tableComp/column/columnTypeComps/simpleTextComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const SimpleTextContent = React.memo(({ value, prefixIcon, suffixIcon, onEvent }
5454

5555
const handleClick = useCallback(() => {
5656
handleClickEvent()
57-
}, [onEvent]);
57+
}, [handleClickEvent]);
5858

5959
return (
6060
<TextWrapper onClick={handleClick}>

client/packages/lowcoder/src/comps/comps/textComp.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ const TextView = React.memo((props: ToViewReturn<ChildrenType>) => {
229229

230230
const handleClick = React.useCallback(() => {
231231
handleClickEvent()
232-
}, [props.onEvent]);
232+
}, [handleClickEvent]);
233233

234234
const containerStyle = useMemo(() => ({
235235
justifyContent: props.horizontalAlignment,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy