fix(CarouselIndicators): li key values generate from provided item va… #1311
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…lues
Generation of key items for
li
components inCarouselIndicators
is aconcatenation of specific, optional values (
src
,caption
, andaltText
) in each item of theitems
object array. Lacking thesekey/value pairs will cause each
li
element to have a key along thelines of
undefinedundefinedundefined
, resulting two or more of theli
's to be identical and causing an error to log in the console.While either including any one of the specified keys with a unique
value, or adding a unique
key
field in each of the items objects willremedy this issue, that solution is not well documented. The proposed
solution is a transparent fix: preventing the aforementioned error while
requiring no change of code for the end-user. The new
key
prop valuefor each
li
will be a concatenation of all the values of itsrespective item object.
Closes #1310