Skip to content

Commit 19b484d

Browse files
author
pipeline
committed
v27.1.56 is released
1 parent c1482cc commit 19b484d

File tree

89 files changed

+857
-96
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+857
-96
lines changed

controls/barcodegenerator/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 27.1.55 (2024-10-22)
5+
## 27.1.56 (2024-10-23)
66

77
### Barcode
88

controls/base/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 27.1.55 (2024-10-22)
5+
## 27.1.56 (2024-10-23)
66

77
### Common
88

controls/buttons/CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,15 @@
22

33
## [Unreleased]
44

5-
## 27.1.55 (2024-10-22)
5+
## 27.1.53 (2024-10-15)
6+
7+
### Checkbox
8+
9+
#### Bug Fixes
10+
11+
- `#F60464`- The issue with "checkbox state input element checked state was not update properly " has been resolved.
12+
13+
## 27.1.51 (2024-09-30)
614

715
### Checkbox
816

controls/buttons/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@syncfusion/ej2-buttons",
3-
"version": "27.1.50",
3+
"version": "27.1.53",
44
"description": "A package of feature-rich Essential JS 2 components such as Button, CheckBox, RadioButton and Switch.",
55
"author": "Syncfusion Inc.",
66
"license": "SEE LICENSE IN license",
@@ -26,7 +26,7 @@
2626
"canteen": "^1.0.5",
2727
"jasmine-ajax": "^3.3.1",
2828
"jasmine-core": "^2.6.1",
29-
"karma": "6.4.2",
29+
"karma": "6.4.2",
3030
"karma-chrome-launcher": "^2.2.0",
3131
"karma-generic-preprocessor": "^1.1.0",
3232
"karma-htmlfile-reporter": "^0.3.5",

controls/buttons/spec/check-box.spec.ts

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ describe('CheckBox', () => {
424424
describe('CheckBox in HTML5 forms', () => {
425425
let input: HTMLFormElement;
426426
let input1: HTMLFormElement;
427+
let input2: HTMLFormElement;
427428
let formElement: HTMLFormElement;
428429
let cbox: CheckBox;
429430
let cbox1: CheckBox;
@@ -439,11 +440,21 @@ describe('CheckBox', () => {
439440

440441
input1 = createElement('input', { id: 'checkbox2' }) as HTMLFormElement;
441442
input1.setAttribute('type', 'checkbox');
443+
input2 = createElement('input', { id: 'checkbox3' }) as HTMLFormElement;
442444

443445
formElement.appendChild(input);
444446
formElement.appendChild(input1);
447+
formElement.appendChild(input2);
445448

446449
document.body.appendChild(formElement);
450+
451+
let buttonElement = document.createElement('button');
452+
buttonElement.setAttribute('id', 'checkButton');
453+
document.body.appendChild(buttonElement);
454+
buttonElement.addEventListener('click', () => {
455+
checkbox.checked = true; // Set the checkbox to checked
456+
checkbox.dataBind();
457+
});
447458
})
448459

449460
afterEach(() => {
@@ -490,6 +501,26 @@ describe('CheckBox', () => {
490501
expect(cbox.checked).toBeFalsy();
491502
expect(cbox1.checked).toBeFalsy();
492503
});
504+
505+
it('908821-Checkbox component bug using required attribute', () => {
506+
checkbox = new CheckBox({
507+
checked: false,
508+
created: created,
509+
}, '#checkbox3');
510+
checkbox.isVue = true;
511+
function created() {
512+
if (checkbox.element) {
513+
checkbox.element.setAttribute('required', ''); // Set the required attribute
514+
}
515+
}
516+
const button = document.querySelector('#checkButton') as HTMLButtonElement;
517+
button.click();
518+
expect(checkbox.element.checked).toBe(true);
519+
checkbox.checked = false;
520+
checkbox.dataBind();
521+
expect(checkbox.element.checked).toBe(false);
522+
checkbox.isVue = false;
523+
});
493524
});
494525

495526
describe('Notify Html Attributes property changes of', () => {
@@ -528,7 +559,6 @@ describe('CheckBox', () => {
528559
checkbox.dataBind();
529560
expect(element.parentElement.children[0].getAttribute("readonly").indexOf("true")).toEqual(0);
530561
});
531-
532562

533563
});
534564

controls/buttons/src/check-box/check-box.ts

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const RIPPLECHECK: string = 'e-ripple-check';
2222
const RIPPLEINDETERMINATE: string = 'e-ripple-stop';
2323
const RTL: string = 'e-rtl';
2424
const WRAPPER: string = 'e-checkbox-wrapper';
25-
const containerAttr: string[] = ['title', 'class', 'style', 'disabled', 'readonly', 'name', 'value', 'id', 'tabindex', 'aria-label'];
25+
const containerAttr: string[] = ['title', 'class', 'style', 'disabled', 'readonly', 'name', 'value', 'id', 'tabindex', 'aria-label', 'required'];
2626

2727
/**
2828
* The CheckBox is a graphical user interface element that allows you to select one or more options from the choices.
@@ -165,7 +165,7 @@ export class CheckBox extends Component<HTMLInputElement> implements INotifyProp
165165
super(options, <string | HTMLInputElement>element);
166166
}
167167

168-
private changeState(state?: string, isInitialize?: boolean ): void {
168+
private changeState(state?: string, isInitialize?: boolean, isInterAction?: boolean): void {
169169
const wrapper: Element = this.getWrapper() as Element;
170170
let rippleSpan: Element | null = null;
171171
let frameSpan: Element | null = null;
@@ -185,7 +185,7 @@ export class CheckBox extends Component<HTMLInputElement> implements INotifyProp
185185
rippleSpan.classList.add(RIPPLECHECK);
186186
}
187187
this.element.checked = true;
188-
if ((this.element.required || closest(this.element, 'form') && closest(this.element, 'form').classList.contains('e-formvalidator')) && this.validCheck && !isInitialize) {
188+
if ((this.element.required || closest(this.element, 'form') && closest(this.element, 'form').classList.contains('e-formvalidator')) && this.validCheck && !isInitialize && isInterAction) {
189189
this.element.checked = false;
190190
this.validCheck = false;
191191
} else if (this.element.required || closest(this.element, 'form') && closest(this.element, 'form').classList.contains('e-formvalidator')) {
@@ -199,7 +199,7 @@ export class CheckBox extends Component<HTMLInputElement> implements INotifyProp
199199
removeClass([rippleSpan], [RIPPLECHECK, RIPPLEINDETERMINATE]);
200200
}
201201
this.element.checked = false;
202-
if ((this.element.required || closest(this.element, 'form') && closest(this.element, 'form').classList.contains('e-formvalidator')) && this.validCheck && !isInitialize) {
202+
if ((this.element.required || closest(this.element, 'form') && closest(this.element, 'form').classList.contains('e-formvalidator')) && this.validCheck && !isInitialize && isInterAction) {
203203
this.element.checked = true;
204204
this.validCheck = false;
205205
} else if (this.element.required || closest(this.element, 'form') && closest(this.element, 'form').classList.contains('e-formvalidator')) {
@@ -221,9 +221,6 @@ export class CheckBox extends Component<HTMLInputElement> implements INotifyProp
221221

222222
private clickHandler(event: Event): void {
223223
if ((event.target as HTMLElement).tagName === 'INPUT' && this.clickTriggered) {
224-
if (this.isVue) {
225-
this.changeState(this.checked ? 'check' : 'uncheck');
226-
}
227224
this.clickTriggered = false;
228225
return;
229226
}
@@ -236,14 +233,14 @@ export class CheckBox extends Component<HTMLInputElement> implements INotifyProp
236233
this.isMouseClick = false;
237234
}
238235
if (this.indeterminate) {
239-
this.changeState(this.checked ? 'check' : 'uncheck');
236+
this.changeState(this.checked ? 'check' : 'uncheck', false, true);
240237
this.indeterminate = false;
241238
this.element.indeterminate = false;
242239
} else if (this.checked) {
243-
this.changeState('uncheck');
240+
this.changeState('uncheck', false, true);
244241
this.checked = false;
245242
} else {
246-
this.changeState('check');
243+
this.changeState('check', false, true);
247244
this.checked = true;
248245
}
249246
const changeEventArgs: ChangeEventArgs = { checked: this.updateVueArrayModel(false), event: event };

controls/calendars/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 27.1.55 (2024-10-22)
5+
## 27.1.56 (2024-10-23)
66

77
### DateTimePicker
88

controls/charts/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 27.1.55 (2024-10-22)
5+
## 27.1.56 (2024-10-23)
66

77
### Chart
88

controls/circulargauge/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
## [Unreleased]
66

7-
## 27.1.55 (2024-10-22)
7+
## 27.1.56 (2024-10-23)
88

99
### Circular Gauge
1010

controls/data/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## [Unreleased]
44

5-
## 27.1.55 (2024-10-22)
5+
## 27.1.56 (2024-10-23)
66

77
### DataManager
88

0 commit comments

Comments
 (0)