Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#2667]fix the bug of the data-size when the first option style has 'display: none' #2713

Merged
merged 3 commits into from
Mar 2, 2022
Merged

[#2667]fix the bug of the data-size when the first option style has 'display: none' #2713

merged 3 commits into from
Mar 2, 2022

Conversation

megumiimai
Copy link
Contributor

@megumiimai megumiimai commented Feb 28, 2022

resolved: #2667

@@ -1920,7 +1920,8 @@
if (this.selectpicker.current.data.length) {
for (var i = 0; i < this.selectpicker.current.data.length; i++) {
var data = this.selectpicker.current.data[i];
if (data.type === 'option') {
var a = data.element.firstChild;
Copy link
Collaborator

Choose a reason for hiding this comment

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

a is a poor variable name choice

@megumiimai megumiimai changed the title [#2667]fix the bug of the data-size when the first option style has 'display: none' [WIP][#2667]fix the bug of the data-size when the first option style has 'display: none' Feb 28, 2022
@megumiimai megumiimai changed the title [WIP][#2667]fix the bug of the data-size when the first option style has 'display: none' [#2667]fix the bug of the data-size when the first option style has 'display: none' Feb 28, 2022
@megumiimai megumiimai requested a review from NicolasCARPi March 1, 2022 09:01
@NicolasCARPi NicolasCARPi changed the base branch from main to dev March 1, 2022 14:00
Copy link
Collaborator

@NicolasCARPi NicolasCARPi left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution. This change would be a good opportunity to add a test case in the tests folder (even if we don't currently test automatically for things yet). Basically an example showing the problem, and showing that with this PR the problem goes away!

@megumiimai megumiimai requested a review from NicolasCARPi March 2, 2022 14:07
@megumiimai
Copy link
Contributor Author

megumiimai commented Mar 2, 2022

thank you for reviewing. I added a test (febdfea) and pasted the capture. How about that?

problem

fixed

Copy link
Collaborator

@NicolasCARPi NicolasCARPi left a comment

Choose a reason for hiding this comment

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

Thanks, looks good to me!

@NicolasCARPi NicolasCARPi merged commit 3b22002 into snapappointments:dev Mar 2, 2022
@megumiimai megumiimai deleted the 2667_fix_issue_with_data-size_bug branch March 30, 2022 08:23
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.

Hide elements with data-size attribute
2 participants