glints-aries 4.0.317 → 4.0.318
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/es/@next/Select/Select.d.ts +3 -1
- package/es/@next/Select/Select.js +3 -1
- package/es/@next/Select/components/Activator/ActivatorSelect.js +1 -1
- package/lib/@next/Select/Select.d.ts +3 -1
- package/lib/@next/Select/Select.js +3 -1
- package/lib/@next/Select/components/Activator/ActivatorSelect.js +1 -1
- package/package.json +1 -1
|
@@ -25,6 +25,8 @@ export interface SelectProps {
|
|
|
25
25
|
onSelect?({ value }: {
|
|
26
26
|
value: string;
|
|
27
27
|
}): void;
|
|
28
|
+
/** callback function when select component is clicked (opened) */
|
|
29
|
+
onSelectClick?: () => void;
|
|
28
30
|
options?: Option[];
|
|
29
31
|
/** sets whether OptionList will follow content's width */
|
|
30
32
|
optionListFitContent?: boolean;
|
|
@@ -43,5 +45,5 @@ export interface SelectProps {
|
|
|
43
45
|
/** sets z-index override for option list dropdown. z-index default to 400 */
|
|
44
46
|
zIndexOverride?: number;
|
|
45
47
|
}
|
|
46
|
-
export declare const Select: ({ allowMultiple, customActivatorIcon, disabled, hasError, helpText, label, listHeight, loadingOptions, name, onClose, onRemoveTag, onSelect, optionListFitContent, options, placeholder, prefix, searchable, searchableProps, scrollable, sections, selectedValues, width, zIndexOverride, }: SelectProps) => JSX.Element;
|
|
48
|
+
export declare const Select: ({ allowMultiple, customActivatorIcon, disabled, hasError, helpText, label, listHeight, loadingOptions, name, onClose, onRemoveTag, onSelect, onSelectClick, optionListFitContent, options, placeholder, prefix, searchable, searchableProps, scrollable, sections, selectedValues, width, zIndexOverride, }: SelectProps) => JSX.Element;
|
|
47
49
|
export {};
|
|
@@ -23,6 +23,7 @@ export var Select = function Select(_ref) {
|
|
|
23
23
|
onClose = _ref.onClose,
|
|
24
24
|
onRemoveTag = _ref.onRemoveTag,
|
|
25
25
|
onSelect = _ref.onSelect,
|
|
26
|
+
onSelectClick = _ref.onSelectClick,
|
|
26
27
|
_ref$optionListFitCon = _ref.optionListFitContent,
|
|
27
28
|
optionListFitContent = _ref$optionListFitCon === void 0 ? false : _ref$optionListFitCon,
|
|
28
29
|
_ref$options = _ref.options,
|
|
@@ -138,7 +139,8 @@ export var Select = function Select(_ref) {
|
|
|
138
139
|
selectedValues: selectedValues,
|
|
139
140
|
options: options,
|
|
140
141
|
name: name,
|
|
141
|
-
prefix: prefix
|
|
142
|
+
prefix: prefix,
|
|
143
|
+
onClick: onSelectClick
|
|
142
144
|
});
|
|
143
145
|
};
|
|
144
146
|
return /*#__PURE__*/React.createElement(Popover, {
|
|
@@ -25,6 +25,8 @@ export interface SelectProps {
|
|
|
25
25
|
onSelect?({ value }: {
|
|
26
26
|
value: string;
|
|
27
27
|
}): void;
|
|
28
|
+
/** callback function when select component is clicked (opened) */
|
|
29
|
+
onSelectClick?: () => void;
|
|
28
30
|
options?: Option[];
|
|
29
31
|
/** sets whether OptionList will follow content's width */
|
|
30
32
|
optionListFitContent?: boolean;
|
|
@@ -43,5 +45,5 @@ export interface SelectProps {
|
|
|
43
45
|
/** sets z-index override for option list dropdown. z-index default to 400 */
|
|
44
46
|
zIndexOverride?: number;
|
|
45
47
|
}
|
|
46
|
-
export declare const Select: ({ allowMultiple, customActivatorIcon, disabled, hasError, helpText, label, listHeight, loadingOptions, name, onClose, onRemoveTag, onSelect, optionListFitContent, options, placeholder, prefix, searchable, searchableProps, scrollable, sections, selectedValues, width, zIndexOverride, }: SelectProps) => JSX.Element;
|
|
48
|
+
export declare const Select: ({ allowMultiple, customActivatorIcon, disabled, hasError, helpText, label, listHeight, loadingOptions, name, onClose, onRemoveTag, onSelect, onSelectClick, optionListFitContent, options, placeholder, prefix, searchable, searchableProps, scrollable, sections, selectedValues, width, zIndexOverride, }: SelectProps) => JSX.Element;
|
|
47
49
|
export {};
|
|
@@ -29,6 +29,7 @@ var Select = function Select(_ref) {
|
|
|
29
29
|
onClose = _ref.onClose,
|
|
30
30
|
onRemoveTag = _ref.onRemoveTag,
|
|
31
31
|
onSelect = _ref.onSelect,
|
|
32
|
+
onSelectClick = _ref.onSelectClick,
|
|
32
33
|
_ref$optionListFitCon = _ref.optionListFitContent,
|
|
33
34
|
optionListFitContent = _ref$optionListFitCon === void 0 ? false : _ref$optionListFitCon,
|
|
34
35
|
_ref$options = _ref.options,
|
|
@@ -144,7 +145,8 @@ var Select = function Select(_ref) {
|
|
|
144
145
|
selectedValues: selectedValues,
|
|
145
146
|
options: options,
|
|
146
147
|
name: name,
|
|
147
|
-
prefix: prefix
|
|
148
|
+
prefix: prefix,
|
|
149
|
+
onClick: onSelectClick
|
|
148
150
|
});
|
|
149
151
|
};
|
|
150
152
|
return /*#__PURE__*/_react["default"].createElement(_Popover.Popover, {
|
|
@@ -54,7 +54,7 @@ var ActivatorSelect = function ActivatorSelect(_ref) {
|
|
|
54
54
|
e.preventDefault();
|
|
55
55
|
e.stopPropagation();
|
|
56
56
|
onSelectClick();
|
|
57
|
-
onClick;
|
|
57
|
+
onClick(e);
|
|
58
58
|
};
|
|
59
59
|
var placeholderMarkup = /*#__PURE__*/_react["default"].createElement(_Typography.Typography, {
|
|
60
60
|
variant: "body1",
|