Skip to content

Commit 301eda5

Browse files
author
unknown
committed
4.26.0
1 parent 882ff9a commit 301eda5

File tree

14 files changed

+110
-58
lines changed

14 files changed

+110
-58
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ All fully responsive. All compatible with different browsers.
5858

5959
# Version:
6060

61-
- MDBReact 4.25.6
61+
- MDBReact 4.26.0
6262
- React 16.12.0
6363

6464
# Quick start

README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Material Design for Bootstrap
22

3-
Version: MDB React Pro 4.25.6
3+
Version: MDB React Pro 4.26.0
44

55
Documentation:
66
https://mdbootstrap.com/docs/react/

dist/css/mdb.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mdbreact.esm.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/mdbreact.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/scss/mdb-free.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@
4040
@import "free/treeview";
4141
// Free addons
4242
@import "addons/datatables";
43+
@import "addons/rating";
4344
@import "addons/datatables-select";
45+
@import "addons/rating";
4446
@import "addons/directives";
4547
@import "addons/hierarchical-display";
4648
@import "addons/flag";

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mdbreact",
3-
"version": "4.25.6",
3+
"version": "4.26.0",
44
"author": "MDBootstrap",
55
"repository": "https://github.com/mdbootstrap/React-Bootstrap-with-Material-Design",
66
"main": "dist/mdbreact.js",

src/components/Carousel/Carousel.js

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,29 @@ class Carousel extends Component {
1919
carouselRef = React.createRef();
2020

2121
componentDidMount() {
22-
const { interval, thumbnails } = this.props;
22+
const { interval, thumbnails, length } = this.props;
2323
if (interval === false) {
2424
return;
2525
}
2626
this.cycleInterval = setInterval(this.next, interval);
2727

2828
// get images src atr
2929
if (thumbnails) {
30-
const CarouselItemsArray = this.carouselRef.current.querySelectorAll(
31-
'.carousel-item img'
32-
);
30+
const CarouselItemsArray = this.carouselRef.current.querySelectorAll('.carousel-item img');
3331

34-
const srcArray = Array.prototype.map.call(
35-
CarouselItemsArray,
36-
item => item.src
37-
);
32+
const srcArray = Array.prototype.map.call(CarouselItemsArray, item => item.src);
3833
this.setState({ ...this.state, srcArray });
3934
}
35+
36+
this.setState({ initialLength: length });
4037
}
4138

42-
componentDidUpdate() {
39+
componentDidUpdate(prevProps, prevState) {
4340
const { length } = this.props;
44-
const { InitialLength } = this.state;
45-
if (InitialLength !== length) {
46-
this.setState({
47-
InitialLength: length
48-
});
41+
const initialLength = length;
42+
43+
if (prevState.initialLength !== length) {
44+
this.setState({ initialLength });
4945
}
5046
}
5147

@@ -246,9 +242,7 @@ class Carousel extends Component {
246242
/>
247243
</>
248244
)}
249-
{showIndicators && (
250-
<CarouselIndicators>{CarouselIndicatorsArray}</CarouselIndicators>
251-
)}
245+
{showIndicators && <CarouselIndicators>{CarouselIndicatorsArray}</CarouselIndicators>}
252246
</Tag>
253247
);
254248
}

src/components/Dropdown/DropdownItem/DropdownItem.js

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,7 @@ class DropdownItem extends Component {
3333

3434
render() {
3535
const tabIndex = this.getTabIndex();
36-
let {
37-
className,
38-
divider,
39-
tag: Tag,
40-
header,
41-
href,
42-
active,
43-
disabled,
44-
...props
45-
} = omit(this.props, ['toggle']);
36+
let { className, divider, tag: Tag, header, href, active, disabled, ...props } = omit(this.props, ['toggle']);
4637

4738
const { toggle } = this.props;
4839

@@ -67,8 +58,7 @@ class DropdownItem extends Component {
6758
}
6859
}
6960

70-
const type =
71-
Tag === 'button' && (props.onClick || toggle) ? 'button' : undefined;
61+
const type = Tag === 'button' && (props.onClick || toggle) ? 'button' : undefined;
7262

7363
return (
7464
<Tag

0 commit comments

Comments
 (0)