@gravity-ui/blog-constructor 2.0.0 → 2.0.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.0.1](https://github.com/gravity-ui/blog-constructor/compare/v2.0.0...v2.0.1) (2023-04-04)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * throw virtualization threshold prop in Select ([#26](https://github.com/gravity-ui/blog-constructor/issues/26)) ([ccb0f19](https://github.com/gravity-ui/blog-constructor/commit/ccb0f19a904e54fd43ca66195da9e94925d0a26f))
9
+ * throw virtualization threshold prop in Select ([#26](https://github.com/gravity-ui/blog-constructor/issues/26)) ([0aa5aed](https://github.com/gravity-ui/blog-constructor/commit/0aa5aeda9a0afd99ae8590c6b666c033a12b7fba))
10
+
3
11
  ## [2.0.0](https://github.com/gravity-ui/blog-constructor/compare/v1.1.2...v2.0.0) (2023-04-03)
4
12
 
5
13
 
@@ -41,6 +41,7 @@ const cn_1 = require("../../../../utils/cn");
41
41
  const b = (0, cn_1.block)('feed-controls');
42
42
  const ICON_SIZE = 16;
43
43
  const DEFAULT_PAGE = 1;
44
+ const VIRTUALIZATION_THRESHOLD = 1000;
44
45
  const Controls = ({ setIsFetching, tags = [], services = [], handleChangeQuery, queryParams, }) => {
45
46
  const { hasLikes } = (0, react_1.useContext)(LikesContext_1.LikesContext);
46
47
  const { savedOnly: savedOnlyInitial, search: searchInitial, tags: tagInitial, services: servicesInitial, } = queryParams || {};
@@ -91,13 +92,13 @@ const Controls = ({ setIsFetching, tags = [], services = [], handleChangeQuery,
91
92
  initial: [tagInitial],
92
93
  list: tagsItems,
93
94
  defaultLabel: (0, i18n_1.i18)(i18n_1.Keyset.AllTags),
94
- }), disablePortal: true, renderOption: customRenders_1.renderOption })),
95
+ }), disablePortal: true, virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: customRenders_1.renderOption })),
95
96
  services.length > 0 ? (react_1.default.createElement("div", { className: b('filter-item') },
96
97
  react_1.default.createElement(uikit_1.Select, { className: b('select'), size: "xl", multiple: true, filterable: true, disablePortal: true, options: services, defaultValue: servicesItems, popupClassName: b('popup'), onUpdate: handleServicesSelect, placeholder: (0, i18n_1.i18)(i18n_1.Keyset.AllServices), renderControl: (0, customRenders_1.renderSwitcher)({
97
98
  initial: servicesItems,
98
99
  list: services,
99
100
  defaultLabel: (0, i18n_1.i18)(i18n_1.Keyset.AllServices),
100
- }), renderOption: customRenders_1.renderOption, renderFilter: customRenders_1.renderFilter }))) : null,
101
+ }), virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: customRenders_1.renderOption, renderFilter: customRenders_1.renderFilter }))) : null,
101
102
  hasLikes ? (react_1.default.createElement("div", { className: b('filter-item', { 'width-auto': true }) },
102
103
  react_1.default.createElement(uikit_1.Button, { view: 'outlined', className: b('saved-only-button', { savedOnly }), size: "xl", onClick: handleSavedOnly },
103
104
  react_1.default.createElement(uikit_1.Icon, { data: Save_1.Save, size: ICON_SIZE, className: b('icon', { savedOnly }) }),
@@ -13,6 +13,7 @@ import './Controls.css';
13
13
  const b = block('feed-controls');
14
14
  const ICON_SIZE = 16;
15
15
  const DEFAULT_PAGE = 1;
16
+ const VIRTUALIZATION_THRESHOLD = 1000;
16
17
  export const Controls = ({ setIsFetching, tags = [], services = [], handleChangeQuery, queryParams, }) => {
17
18
  const { hasLikes } = useContext(LikesContext);
18
19
  const { savedOnly: savedOnlyInitial, search: searchInitial, tags: tagInitial, services: servicesInitial, } = queryParams || {};
@@ -63,13 +64,13 @@ export const Controls = ({ setIsFetching, tags = [], services = [], handleChange
63
64
  initial: [tagInitial],
64
65
  list: tagsItems,
65
66
  defaultLabel: i18(Keyset.AllTags),
66
- }), disablePortal: true, renderOption: renderOption })),
67
+ }), disablePortal: true, virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: renderOption })),
67
68
  services.length > 0 ? (React.createElement("div", { className: b('filter-item') },
68
69
  React.createElement(Select, { className: b('select'), size: "xl", multiple: true, filterable: true, disablePortal: true, options: services, defaultValue: servicesItems, popupClassName: b('popup'), onUpdate: handleServicesSelect, placeholder: i18(Keyset.AllServices), renderControl: renderSwitcher({
69
70
  initial: servicesItems,
70
71
  list: services,
71
72
  defaultLabel: i18(Keyset.AllServices),
72
- }), renderOption: renderOption, renderFilter: renderFilter }))) : null,
73
+ }), virtualizationThreshold: VIRTUALIZATION_THRESHOLD, renderOption: renderOption, renderFilter: renderFilter }))) : null,
73
74
  hasLikes ? (React.createElement("div", { className: b('filter-item', { 'width-auto': true }) },
74
75
  React.createElement(Button, { view: 'outlined', className: b('saved-only-button', { savedOnly }), size: "xl", onClick: handleSavedOnly },
75
76
  React.createElement(Icon, { data: Save, size: ICON_SIZE, className: b('icon', { savedOnly }) }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/blog-constructor",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Gravity UI Blog Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {