Skip to content

Commit

Permalink
#1586 the list/not list radio button doesn't work after clicking the …
Browse files Browse the repository at this point in the history
…first time (#1591)

* clean up PeriodTable component

* clean up PeriodTable component - 2

Co-authored-by: Anastasiia Moskvina <anastasiia_moskvina@epam.com>
  • Loading branch information
AnaMoskvina and Anastasiia Moskvina authored May 12, 2022
1 parent 69268f4 commit f04567a
Showing 1 changed file with 0 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,9 @@ class Table extends Component {
current: Elements.get(2),
isInfo: false
}
this.firstType = true
}

changeType = (type) => {
if (this.firstType) {
this.firstType = false
return
}
const prevChoice =
this.state.type === 'list' || this.state.type === 'not-list'
const currentChoice = type === 'list' || type === 'not-list'
Expand Down Expand Up @@ -108,23 +103,6 @@ class Table extends Component {
}
}

periodicTable = (value) => {
const { type, current, isInfo } = this.state
return (
<div className={classes.periodTable}>
<AtomInfo el={current} isInfo={isInfo} />
<ElementsTable
value={value}
currentEvents={this.currentEvents}
selected={this.selected}
onAtomSelect={(label) => this.onAtomSelect(label)}
onDoubleClick={(label) => this.onAtomSelect(label, true)}
/>
<TypeChoice value={type} onChange={this.changeType} />
</div>
)
}

render() {
const { type, value } = this.state
const HeaderContent = this.headerContent
Expand Down

0 comments on commit f04567a

Please sign in to comment.