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

Fix bug in repeater buttons #6525

Merged
merged 2 commits into from
Apr 10, 2017
Merged

Fix bug in repeater buttons #6525

merged 2 commits into from
Apr 10, 2017

Conversation

eduardomart
Copy link
Contributor

@eduardomart eduardomart commented Mar 29, 2017

Problem:
Currently, when reaching the limit set in a repeater definition, the [Add new Repeater set] button gets grayed out but clicking it still adds a new repeater set, and the [Duplicate set] button gets wrongly grayed out.

Fix:
The .disabled class was being applied to the [Duplicate set] buttons, instead of adding the “disabled” property to the [Add new Repeater set] button.

Problem:
Currently, when reaching the `limit` in a repeater definition, the [Add
new Repeater set] button gets grayed out but clicking it still adds a
new repeater set, and the [Duplicate set] button also gets wrongly
grayed out.

Fix:
The `.disabled` class was being applied to the [Duplicate set] button,
instead of adding the “disabled” property to the [Add new Repeater set]
button.
@@ -246,10 +246,10 @@

if (this._count >= this.options.maximum) {
this._ui.add.addClass('disabled');
this.element.find('.duplicate-button').addClass('disabled');
this._ui.add.prop('disabled', 'disabled');
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you also add this line underneath:

this.element.find('.duplicate-button').prop('disabled', 'disabled');

} else {
this._ui.add.removeClass('disabled');
this.element.find('.duplicate-button').removeClass('disabled');
this._ui.add.prop('disabled', false);
Copy link
Contributor

Choose a reason for hiding this comment

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

and this line underneath here:

this.element.find('.duplicate-button').prop('disabled', false);

@eduardomart
Copy link
Contributor Author

@ross I should have known that, thanks for catching it!

@ross
Copy link

ross commented Apr 1, 2017

@ross I should have known that, thanks for catching it!

I think you want @rossriley

@eduardomart
Copy link
Contributor Author

@ross you're right, sorry, I am used to his Slack handle :-)

- make sure ‘duplicate set’ button is disabled when max repeaters are
reached
- make sure ‘delete set’ button is disabled when minimum is reached
@eduardomart
Copy link
Contributor Author

@rossriley

I updated the files. Just pinging you since I am not sure you got a notification from git, I didn't.

@bobdenotter
Copy link
Member

@rossriley This should be GTG now, right?

@rossriley rossriley merged commit 2e2f950 into bolt:release/3.2 Apr 10, 2017
@GwendolenLynch GwendolenLynch added this to the Bolt 3.2 - Feature release milestone Jul 18, 2017
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.

5 participants