зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1576652 - Remove unused state in Debugger's Accordion component; r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D43492 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
3b375c8b7b
Коммит
8269474069
|
@ -21,20 +21,7 @@ type AccordionItem = {
|
|||
|
||||
type Props = { items: Array<Object> };
|
||||
|
||||
type State = {
|
||||
opened: boolean[],
|
||||
created: boolean[],
|
||||
};
|
||||
|
||||
class Accordion extends Component<Props, State> {
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
opened: props.items.map(item => item.opened),
|
||||
created: [],
|
||||
};
|
||||
}
|
||||
|
||||
class Accordion extends Component<Props> {
|
||||
handleHeaderClick(i: number) {
|
||||
const item = this.props.items[i];
|
||||
const opened = !item.opened;
|
||||
|
|
Загрузка…
Ссылка в новой задаче