MCPcopy Create free account
hub / github.com/ElemeFE/element-react / addItem

Method addItem

src/carousel/Carousel.jsx:147–150  ·  view source on GitHub ↗
(item: Component)

Source from the content-addressed store, hash-verified

145 }
146
147 addItem(item: Component): void {
148 this.state.items.push(item);
149 this.setActiveItem(0);
150 }
151
152 removeItem(item: Component): void {
153 this.state.items.splice(this.state.items.indexOf(item), 1);

Callers 1

componentWillMountMethod · 0.80

Calls 1

setActiveItemMethod · 0.95

Tested by

no test coverage detected