Skip to content

Commit

Permalink
fix(ConnectionsPanel): set data in advanced state (for checking the a…
Browse files Browse the repository at this point in the history
…bility to edit text).
  • Loading branch information
YishaiGlasner committed Oct 28, 2024
1 parent 46f6699 commit 4ef9c87
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions static/js/ReaderPanel.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class ReaderPanel extends Component {
}
conditionalSetTextData() {
this.setState({data: null});
if (this.state.mode === "Text" || this.state.mode === "TextAndConnections") {
if (this.state.mode === "Text" || this.state.mode === "TextAndConnections" || this.state.connectionsMode === 'Advanced Tools') {
const ref = this.state.currentlyVisibleRef;
Sefaria.getTextFromCurrVersions(ref, this.state.currVersions, this.props.translationLanguagePreference, true).then(data => {
this.setState({data: data});
Expand Down Expand Up @@ -102,7 +102,8 @@ class ReaderPanel extends Component {
$(".readerOptionsPanel").find('.on:focusable').first().focus();
}
if (!Sefaria.areBothVersionsEqual(prevState.currVersions, this.state.currVersions) ||
this.state.currentlyVisibleRef !== prevState.currentlyVisibleRef) {
this.state.currentlyVisibleRef !== prevState.currentlyVisibleRef ||
this.state.connectionsMode !== prevState.connectionsMode) {
this.conditionalSetTextData();
}
if (this.shouldLayoutUpdate(prevState)) {
Expand Down

0 comments on commit 4ef9c87

Please sign in to comment.