@steroidsjs/core 3.0.30 → 3.0.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs-autogen-result.json
CHANGED
|
@@ -19045,6 +19045,24 @@
|
|
|
19045
19045
|
"example": null
|
|
19046
19046
|
}
|
|
19047
19047
|
]
|
|
19048
|
+
},
|
|
19049
|
+
{
|
|
19050
|
+
"name": "onItemSelect",
|
|
19051
|
+
"decorators": [],
|
|
19052
|
+
"description": "Callback-функция, которая вызывается при выборе элемента DropDown",
|
|
19053
|
+
"required": false,
|
|
19054
|
+
"type": "void",
|
|
19055
|
+
"example": null,
|
|
19056
|
+
"parameters": [
|
|
19057
|
+
{
|
|
19058
|
+
"name": "selectedId",
|
|
19059
|
+
"decorators": [],
|
|
19060
|
+
"description": "",
|
|
19061
|
+
"required": true,
|
|
19062
|
+
"type": "string | number",
|
|
19063
|
+
"example": null
|
|
19064
|
+
}
|
|
19065
|
+
]
|
|
19048
19066
|
}
|
|
19049
19067
|
]
|
|
19050
19068
|
},
|
|
@@ -19499,6 +19517,24 @@
|
|
|
19499
19517
|
}
|
|
19500
19518
|
]
|
|
19501
19519
|
},
|
|
19520
|
+
{
|
|
19521
|
+
"name": "onItemSelect",
|
|
19522
|
+
"decorators": [],
|
|
19523
|
+
"description": "Callback-функция, которая вызывается при выборе элемента DropDown",
|
|
19524
|
+
"required": false,
|
|
19525
|
+
"type": "void",
|
|
19526
|
+
"example": null,
|
|
19527
|
+
"parameters": [
|
|
19528
|
+
{
|
|
19529
|
+
"name": "selectedId",
|
|
19530
|
+
"decorators": [],
|
|
19531
|
+
"description": "",
|
|
19532
|
+
"required": true,
|
|
19533
|
+
"type": "string | number",
|
|
19534
|
+
"example": null
|
|
19535
|
+
}
|
|
19536
|
+
]
|
|
19537
|
+
},
|
|
19502
19538
|
{
|
|
19503
19539
|
"name": "onOpen",
|
|
19504
19540
|
"decorators": [],
|
package/package.json
CHANGED
|
@@ -130,6 +130,10 @@ export interface IDropDownFieldProps extends IFieldWrapperInputProps, Omit<IData
|
|
|
130
130
|
* Кастомная вьюшка для элемента
|
|
131
131
|
*/
|
|
132
132
|
itemView?: CustomView;
|
|
133
|
+
/**
|
|
134
|
+
* Callback-функция, которая вызывается при выборе элемента DropDown
|
|
135
|
+
*/
|
|
136
|
+
onItemSelect?: (selectedId: string | number) => void;
|
|
133
137
|
/**
|
|
134
138
|
* Callback-функция, которая вызывается при закрытии DropDown
|
|
135
139
|
*/
|
|
@@ -127,7 +127,10 @@ function DropDownField(props) {
|
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
129
|
setSelectedIds(id);
|
|
130
|
-
|
|
130
|
+
if (props.onItemSelect) {
|
|
131
|
+
props.onItemSelect(id);
|
|
132
|
+
}
|
|
133
|
+
}, [normalizedItemToSelectAll === null || normalizedItemToSelectAll === void 0 ? void 0 : normalizedItemToSelectAll.id, props, setSelectedAll, setSelectedIds]);
|
|
131
134
|
var onItemRemove = (0, react_1.useCallback)(function (id) {
|
|
132
135
|
setSelectedIds(selectedIds.filter(function (i) { return i !== id; }));
|
|
133
136
|
}, [selectedIds, setSelectedIds]);
|