Skip to content

Commit 2bf337a

Browse files
committed
chore: removing onleave and onenter event
1 parent a12fd9b commit 2bf337a

File tree

14 files changed

+6
-207
lines changed

14 files changed

+6
-207
lines changed

packages/pluggableWidgets/selection-controls-web/src/SelectionControls.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,12 @@ import { CheckboxSelection } from "./components/CheckboxSelection/CheckboxSelect
66
import { Placeholder } from "./components/Placeholder";
77
import { RadioSelection } from "./components/RadioSelection/RadioSelection";
88
import { SelectionBaseProps } from "./helpers/types";
9-
import { useActionEvents } from "./hooks/useActionEvents";
109
import { useGetSelector } from "./hooks/useGetSelector";
1110

1211
import "./ui/SelectionControls.scss";
1312

1413
export default function SelectionControls(props: SelectionControlsContainerProps): ReactElement {
1514
const selector = useGetSelector(props);
16-
const actionEvents = useActionEvents({
17-
onEnterEvent: props.onEnterEvent,
18-
onLeaveEvent: props.onLeaveEvent,
19-
selector
20-
});
2115
const commonProps: Omit<SelectionBaseProps<null>, "selector"> = {
2216
tabIndex: props.tabIndex!,
2317
inputId: props.id,
@@ -34,7 +28,7 @@ export default function SelectionControls(props: SelectionControlsContainerProps
3428
};
3529

3630
return (
37-
<div className="widget-selection-controls" {...actionEvents}>
31+
<div className="widget-selection-controls">
3832
{selector.status === "unavailable" ? (
3933
<Placeholder />
4034
) : selector.type === "single" ? (

packages/pluggableWidgets/selection-controls-web/src/SelectionControls.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -247,14 +247,6 @@
247247
<caption>On change action</caption>
248248
<description />
249249
</property>
250-
<property key="onEnterEvent" type="action" required="false">
251-
<caption>On enter action</caption>
252-
<description />
253-
</property>
254-
<property key="onLeaveEvent" type="action" required="false">
255-
<caption>On leave action</caption>
256-
<description />
257-
</property>
258250
</propertyGroup>
259251
<propertyGroup caption="Accessibility">
260252
<propertyGroup caption="Accessibility">

packages/pluggableWidgets/selection-controls-web/src/helpers/Association/BaseAssociationSelector.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ export class BaseAssociationSelector<T extends string | string[], R extends Refe
1818
readOnly = false;
1919
customContentType: OptionsSourceCustomContentTypeEnum = "no";
2020
validation?: string = undefined;
21-
onEnterEvent?: () => void;
22-
onLeaveEvent?: () => void;
2321
protected _attr: R | undefined;
2422
private onChangeEvent?: ActionValue;
2523
private _valuesMap: Map<string, ObjectItem> = new Map();
@@ -64,8 +62,6 @@ export class BaseAssociationSelector<T extends string | string[], R extends Refe
6462
this.status = attr.status;
6563
this.readOnly = attr.readOnly;
6664
this.onChangeEvent = onChangeEvent;
67-
this.onEnterEvent = props.onEnterEvent ? () => executeAction(props.onEnterEvent) : undefined;
68-
this.onLeaveEvent = props.onLeaveEvent ? () => executeAction(props.onLeaveEvent) : undefined;
6965
this.customContentType = customContentType;
7066
this.validation = attr.validation;
7167
}

packages/pluggableWidgets/selection-controls-web/src/helpers/Association/Preview/AssociationPreviewSelector.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,4 @@ export class AssociationPreviewSelector implements SingleSelector {
3636

3737
updateProps() {}
3838
setValue() {}
39-
onEnterEvent() {}
40-
onLeaveEvent() {}
4139
}

packages/pluggableWidgets/selection-controls-web/src/helpers/Database/DatabaseMultiSelector.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ export class DatabaseMultiSelector<T extends string | Big, R extends EditableVal
2323
readOnly = false;
2424
customContentType: OptionsSourceCustomContentTypeEnum = "no";
2525
validation?: string = undefined;
26-
onEnterEvent?: () => void;
27-
onLeaveEvent?: () => void;
2826
values: DatabaseValuesProvider;
2927
protected _objectsMap: Map<string, ObjectItem> = new Map();
3028
protected _attr: R | undefined;

packages/pluggableWidgets/selection-controls-web/src/helpers/Database/DatabaseSingleSelector.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ export class DatabaseSingleSelector<T extends string | Big, R extends EditableVa
2323
readOnly = false;
2424
customContentType: OptionsSourceCustomContentTypeEnum = "no";
2525
validation?: string = undefined;
26-
onEnterEvent?: () => void;
27-
onLeaveEvent?: () => void;
2826
values: DatabaseValuesProvider;
2927
protected _objectsMap: Map<string, ObjectItem> = new Map();
3028
protected _attr: R | undefined;

packages/pluggableWidgets/selection-controls-web/src/helpers/Database/Preview/DatabasePreviewSelector.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,4 @@ export class DatabasePreviewSelector implements SingleSelector {
3636

3737
updateProps() {}
3838
setValue() {}
39-
onEnterEvent() {}
40-
onLeaveEvent() {}
4139
}

packages/pluggableWidgets/selection-controls-web/src/helpers/EnumBool/EnumBooleanSingleSelector.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@ export class EnumBooleanSingleSelector implements SingleSelector {
1616
private isBoolean = false;
1717
private _attr: EditableValue<string | boolean> | undefined;
1818
private onChangeEvent?: ActionValue;
19-
onEnterEvent?: () => void;
20-
onLeaveEvent?: () => void;
2119

2220
currentId: string | null = null;
2321
caption: EnumAndBooleanSimpleCaptionsProvider;
@@ -54,8 +52,6 @@ export class EnumBooleanSingleSelector implements SingleSelector {
5452
}
5553

5654
this.onChangeEvent = props.onChangeEvent;
57-
this.onEnterEvent = props.onEnterEvent ? () => executeAction(props.onEnterEvent) : undefined;
58-
this.onLeaveEvent = props.onLeaveEvent ? () => executeAction(props.onLeaveEvent) : undefined;
5955
this.status = attr.status;
6056
this.isBoolean = typeof attr.universe?.[0] === "boolean";
6157
this.clearable = this.isBoolean ? false : clearable;

packages/pluggableWidgets/selection-controls-web/src/helpers/Static/Preview/StaticPreviewSelector.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,4 @@ export class StaticPreviewSelector implements SingleSelector {
3131

3232
updateProps() {}
3333
setValue() {}
34-
onEnterEvent() {}
35-
onLeaveEvent() {}
3634
}

packages/pluggableWidgets/selection-controls-web/src/helpers/Static/StaticSingleSelector.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ export class StaticSingleSelector implements SingleSelector {
2424
readOnly = false;
2525
customContentType: OptionsSourceCustomContentTypeEnum = "no";
2626
validation?: string = undefined;
27-
onEnterEvent?: () => void;
28-
onLeaveEvent?: () => void;
2927
protected _attr: EditableValue<string | Big | boolean | Date> | undefined;
3028
private onChangeEvent?: ActionValue;
3129
private _objectsMap: Map<string, OptionsSourceStaticDataSourceType> = new Map();
@@ -72,8 +70,6 @@ export class StaticSingleSelector implements SingleSelector {
7270
this.status = attr.status;
7371
this.readOnly = attr.readOnly;
7472
this.onChangeEvent = onChangeEvent;
75-
this.onEnterEvent = props.onEnterEvent ? () => executeAction(props.onEnterEvent) : undefined;
76-
this.onLeaveEvent = props.onLeaveEvent ? () => executeAction(props.onLeaveEvent) : undefined;
7773
this.customContentType = customContentType;
7874
this.validation = attr.validation;
7975
this.attributeType =

0 commit comments

Comments
 (0)