Skip to content

Default selected image props added (pass image index)#8

Open
sojinantony01 wants to merge 2 commits intoleon-good-life:masterfrom
sojinantony01:master
Open

Default selected image props added (pass image index)#8
sojinantony01 wants to merge 2 commits intoleon-good-life:masterfrom
sojinantony01:master

Conversation

@sojinantony01
Copy link
Copy Markdown

Some people need to select the first or last image by default so the default selected index may help them to re-order the image list

this.calcItemDimensions = this.calcItemDimensions.bind(this);
this.calcItemsAmountToRender = this.calcItemsAmountToRender.bind(this);
let index = this.calcIndex();
let index = this.props.defaultSelectedItem || this.props.defaultSelectedItem == 0 ? this.props.defaultSelectedItem : this.calcIndex();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can make it const.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants