Skip to content

Conversation

@acierto
Copy link
Contributor

@acierto acierto commented Aug 22, 2016

No description provided.

}

if (!shallowEqualFuzzy(prevProps.options, this.props.options)) {
this.el.select2(this.props.options);
Copy link
Owner

@rkit rkit Aug 23, 2016

Choose a reason for hiding this comment

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

When updating options you should consider following:
L95-97

const { options } = this.props;
if (!shallowEqualFuzzy(prevProps.options, options)) {
if (typeof options.dropdownParent === 'string') {
options.dropdownParent = $(options.dropdownParent);
Copy link
Owner

Choose a reason for hiding this comment

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

Maybe make a separate method prepareOptions?
To avoid duplicate code:

if (typeof options.dropdownParent === 'string') {
  options.dropdownParent = $(options.dropdownParent);

@rkit rkit merged commit c0ecbf5 into rkit:master Aug 23, 2016
@rkit
Copy link
Owner

rkit commented Aug 23, 2016

Thanks. Tomorrow will be release.

@acierto
Copy link
Contributor Author

acierto commented Aug 23, 2016

Great!

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.

2 participants