diff --git a/web/ASC.Web.Common/src/components/FilterInput/FilterInput.js b/web/ASC.Web.Common/src/components/FilterInput/FilterInput.js index 733d459674..874221511b 100644 --- a/web/ASC.Web.Common/src/components/FilterInput/FilterInput.js +++ b/web/ASC.Web.Common/src/components/FilterInput/FilterInput.js @@ -390,7 +390,7 @@ class FilterInput extends React.Component { : filterItem.key.includes('group') ? 'group' : null; const itemId = filterItem.key.indexOf('_') !== filterItem.key.lastIndexOf('_') ? filterItem.key.slice(0, filterItem.key.lastIndexOf('_')) : filterItem.key; - const itemKey = filterItem.selectedItem && filterItem.selectedItem.key ? itemId + "_" + filterItem.selectedItem.key : filterItem.key; + const itemKey = filterItem.selectedItem && filterItem.selectedItem.key && filterItem.typeSelector === typeSelector ? itemId + "_" + filterItem.selectedItem.key : filterItem.key + '_-1'; const selectedItem = filterItem.typeSelector === typeSelector ? filterItem.selectedItem : {}; const selectFilterItem = { key: itemKey, @@ -518,7 +518,7 @@ class FilterInput extends React.Component { const { searchText, filterValues, openFilterItems, hideFilterItems, sortId, sortDirection } = this.state; - // console.log("FilterInput render", this.state.openFilterItems); + // console.log("filter input render, openFilterItems", openFilterItems, 'hideFilterItems', hideFilterItems); let iconSize = 33; switch (size) { case 'base': diff --git a/web/ASC.Web.Common/src/components/FilterInput/sub-components/FilterBlock.js b/web/ASC.Web.Common/src/components/FilterInput/sub-components/FilterBlock.js index 2ee5e66e1e..239a84ee08 100644 --- a/web/ASC.Web.Common/src/components/FilterInput/sub-components/FilterBlock.js +++ b/web/ASC.Web.Common/src/components/FilterInput/sub-components/FilterBlock.js @@ -35,6 +35,7 @@ class FilterItem extends React.Component { selectedOption }; + } componentDidUpdate(prevProps, prevState) { @@ -121,13 +122,9 @@ class FilterItem extends React.Component { onPeopleSelectorClick = () => this.setState({ isOpenSelector: !this.state.isOpenSelector }); - // shouldComponentUpdate(nextProps, nextState) { - // if (nextProps.selectedItem && nextProps.selectedItem.key && this.props.selectedItem) - // } - - render() { + const { id, isOpen, isOpenSelector, selectedOption } = this.state; const { block, opened, isDisabled, groupLabel, groupItems, label, typeSelector, defaultOptionLabel, groupsCaption, defaultOption } = this.props;