Skip to content

Commit

Permalink
fix design Select languages (map_search)
Browse files Browse the repository at this point in the history
  • Loading branch information
nataliauvarova authored and vmonakhov committed May 31, 2023
1 parent 58481a0 commit c73eeda
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ class Tree extends React.PureComponent {
}

this.updateNodesWithChecked(props.checked, props.filterMode);

const isAllChecked = this.constructor.isAllNodesChecked(Object.keys(this.flatNodes).length, props.checked);

this.state = {
checkAll: false,
checkAll: isAllChecked || false,
expanded:
Object.values(this.flatNodes)
.filter(item => item.expanded)
Expand Down
22 changes: 12 additions & 10 deletions src/components/Search/AdditionalFilter/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -568,16 +568,18 @@ class AdditionalFilter extends React.PureComponent {
>
<Modal.Header>{showLanguagesTreeText}</Modal.Header>
<Modal.Content scrolling>
<Languages
onChange={this.onLangsDictsChange}
languagesTree={languagesTree}
langsChecked={languages}
dictsChecked={dictionaries}
showTree={this.state.showSearchSelectLanguages}
filterMode
checkAllButtonText={checkAllButtonText}
uncheckAllButtonText={uncheckAllButtonText}
/>
<div className="filter-dictionaries">
<Languages
onChange={this.onLangsDictsChange}
languagesTree={languagesTree}
langsChecked={languages}
dictsChecked={dictionaries}
showTree={this.state.showSearchSelectLanguages}
filterMode
checkAllButtonText={checkAllButtonText}
uncheckAllButtonText={uncheckAllButtonText}
/>
</div>
</Modal.Content>
<Modal.Actions>
<Button onClick={this.onShowLangsButtonClick} className="lingvo-button-basic-black">
Expand Down

0 comments on commit c73eeda

Please sign in to comment.