iguazio.dashboard-react-controls 1.3.9 → 1.3.10
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.
|
@@ -178,7 +178,7 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
178
178
|
};
|
|
179
179
|
}, [clickHandler, handleScroll, isOpen]);
|
|
180
180
|
var scrollOptionToView = (0, _react.useCallback)(function () {
|
|
181
|
-
var selectedOptionEl = optionsListRef.current.querySelector("
|
|
181
|
+
var selectedOptionEl = optionsListRef.current.querySelector("[data-custom-id=\"".concat(input.value, "\"]"));
|
|
182
182
|
if (!selectedOptionEl) return;
|
|
183
183
|
searchValue ? optionsListRef.current.scrollTo({
|
|
184
184
|
top: 0,
|
package/dist/constants.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.validation = exports.TERTIARY_BUTTON = exports.TAB_SHIFT = exports.TAB = exports.
|
|
6
|
+
exports.validation = exports.TERTIARY_BUTTON = exports.TAB_SHIFT = exports.TAB = exports.SECONDARY_BUTTON = exports.PRIMARY_BUTTON = exports.NOTFOUND_ERROR_STATUS_CODE = exports.MODAL_SM = exports.MODAL_MIN = exports.MODAL_MD = exports.MODAL_MAX = exports.MODAL_LG = exports.LABEL_BUTTON = exports.INTERNAL_SERVER_ERROR_STATUS_CODE = exports.GATEWAY_TIMEOUT_STATUS_CODE = exports.FORBIDDEN_ERROR_STATUS_CODE = exports.DELETE = exports.DANGER_BUTTON = exports.CONFLICT_ERROR_STATUS_CODE = exports.CLICK = exports.BADREQUEST_ERROR_STATUS_CODE = exports.BACKSPACE = void 0;
|
|
7
7
|
/*
|
|
8
8
|
Copyright 2022 Iguazio Systems Ltd.
|
|
9
9
|
Licensed under the Apache License, Version 2.0 (the "License") with
|
|
@@ -86,8 +86,4 @@ exports.MODAL_LG = MODAL_LG;
|
|
|
86
86
|
var MODAL_MIN = 'min';
|
|
87
87
|
exports.MODAL_MIN = MODAL_MIN;
|
|
88
88
|
var MODAL_MAX = 'max';
|
|
89
|
-
|
|
90
|
-
/*=========== SELECT =============*/
|
|
91
|
-
exports.MODAL_MAX = MODAL_MAX;
|
|
92
|
-
var SELECT_OPTION_ID_PREFIX = 'id-';
|
|
93
|
-
exports.SELECT_OPTION_ID_PREFIX = SELECT_OPTION_ID_PREFIX;
|
|
89
|
+
exports.MODAL_MAX = MODAL_MAX;
|
|
@@ -9,7 +9,6 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
9
9
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
10
|
var _components = require("../../components");
|
|
11
11
|
var _types = require("../../types");
|
|
12
|
-
var _constants = require("../../constants");
|
|
13
12
|
var _checkmark = require("../../images/checkmark.svg");
|
|
14
13
|
require("./selectOption.scss");
|
|
15
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -59,7 +58,7 @@ var SelectOption = function SelectOption(_ref) {
|
|
|
59
58
|
onClick: function onClick() {
|
|
60
59
|
!item.disabled && _onClick(item.id);
|
|
61
60
|
},
|
|
62
|
-
id:
|
|
61
|
+
"data-custom-id": item.id,
|
|
63
62
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
64
63
|
className: "label-row",
|
|
65
64
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
@@ -99,7 +98,6 @@ SelectOption.defaultProps = {
|
|
|
99
98
|
withSelectedIcon: true
|
|
100
99
|
};
|
|
101
100
|
SelectOption.propTypes = {
|
|
102
|
-
disabled: _propTypes.default.bool,
|
|
103
101
|
name: _propTypes.default.string.isRequired,
|
|
104
102
|
item: _types.SELECT_OPTION.isRequired,
|
|
105
103
|
onClick: _propTypes.default.func,
|
|
@@ -68,6 +68,9 @@ var useFormTable = function useFormTable(formState) {
|
|
|
68
68
|
var _editingItemRef$curre, _editingItemRef$curre2;
|
|
69
69
|
if ((_editingItemRef$curre = editingItemRef.current) !== null && _editingItemRef$curre !== void 0 && (_editingItemRef$curre2 = _editingItemRef$curre.ui) !== null && _editingItemRef$curre2 !== void 0 && _editingItemRef$curre2.isNew) {
|
|
70
70
|
formState.form.mutators.remove(editingItemRef.current.ui.fieldsPath, editingItemRef.current.ui.index);
|
|
71
|
+
if (editingItemRef.current.ui.index === 0) {
|
|
72
|
+
formState.form.mutators.concat(editingItemRef.current.ui.fieldsPath, []);
|
|
73
|
+
}
|
|
71
74
|
} else if (editingItemRef.current) {
|
|
72
75
|
formState.form.mutators.update(editingItemRef.current.ui.fieldsPath, editingItemRef.current.ui.index, (0, _lodash.omit)(editingItemRef.current, ['ui']));
|
|
73
76
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iguazio.dashboard-react-controls",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.10",
|
|
4
4
|
"description": "Collection of resources (such as CSS styles, fonts and images) and ReactJS 17.x components to share among different Iguazio React repos.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|