Skip to content

Commit dd26f37

Browse files
committed
refactor(checkbox,radio): Drop initial slotchange invocation
1 parent b0f28d0 commit dd26f37

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/components/carousel/carousel.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ export default class IgcCarouselComponent extends EventEmitterMixin<
384384
if (activeSlides.length <= 1) {
385385
return;
386386
}
387+
387388
const idx = this._slides.indexOf(
388389
added.length ? last(added).node : last(attributes).node
389390
);

src/components/checkbox/checkbox-base.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export class IgcCheckboxBaseComponent extends FormAssociatedCheckboxRequiredMixi
4141
protected readonly _slots = addSlotController(this, {
4242
slots: setSlots('helper-text', 'value-missing', 'custom-error', 'invalid'),
4343
onChange: this._handleSlotChange,
44-
initial: true,
4544
});
4645

4746
protected readonly _focusRingManager = addKeyboardFocusRing(this);
@@ -56,7 +55,7 @@ export class IgcCheckboxBaseComponent extends FormAssociatedCheckboxRequiredMixi
5655
protected readonly _input!: HTMLInputElement;
5756

5857
@state()
59-
protected _hideLabel = false;
58+
protected _hideLabel = true;
6059

6160
/**
6261
* The value attribute of the control.

src/components/radio/radio.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ export default class IgcRadioComponent extends FormAssociatedCheckboxRequiredMix
8585
private readonly _slots = addSlotController(this, {
8686
slots: setSlots('helper-text', 'value-missing', 'custom-error', 'invalid'),
8787
onChange: this._handleSlotChange,
88-
initial: true,
8988
});
9089

9190
protected override readonly _formValue: FormValueOf<boolean> =
@@ -103,7 +102,7 @@ export default class IgcRadioComponent extends FormAssociatedCheckboxRequiredMix
103102
protected readonly _label!: Array<Node>;
104103

105104
@state()
106-
protected _hideLabel = false;
105+
protected _hideLabel = true;
107106

108107
@state()
109108
private _tabIndex = 0;

stories/file-input.stories.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const metadata: Meta<IgcFileInputComponent> = {
2525
component: 'igc-file-input',
2626
parameters: {
2727
docs: { description: { component: '' } },
28-
actions: { handles: ['igcInput', 'igcChange', 'igcCancel'] },
28+
actions: { handles: ['igcChange', 'igcCancel'] },
2929
},
3030
argTypes: {
3131
value: {

0 commit comments

Comments
 (0)