fix: Disallows negative options remaining (#13749)

This commit is contained in:
Michael S. Molina
2021-03-30 12:34:12 -03:00
committed by GitHub
parent 9d0bb3a3ba
commit 4ae9b819d3

View File

@@ -204,7 +204,7 @@ export default class SelectControl extends React.PureComponent {
if (this.optionsIncludesSelectAll(options)) {
remainingOptions -= 1;
}
return remainingOptions;
return remainingOptions < 0 ? 0 : remainingOptions;
}
createMetaSelectAllOption() {