Skip to content

Commit 2a98bf7

Browse files
committed
fix(material-experimental/mdc-slider): fix comments in slider-adapter
* add class description jsdoc * move comment explaining why we use arrow fns
1 parent 5c9b975 commit 2a98bf7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/material-experimental/mdc-slider/slider-adapter.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@ import {SpecificEventListener, EventType} from '@material/base';
1111
import {MDCSliderAdapter, Thumb, TickMark} from '@material/slider';
1212
import {_MatSliderInterface, MAT_SLIDER} from './slider-interface';
1313

14-
// TODO(wagnermaciel): Change to prototype methods once this PR is submitted.
15-
// https://github.com/material-components/material-components-web/pull/6256
14+
/** The MDCSliderAdapter implementation. */
1615
export class SliderAdapter implements MDCSliderAdapter {
1716
constructor(@Inject(MAT_SLIDER) private readonly _delegate: _MatSliderInterface) {}
17+
18+
// We manually assign functions instead of using prototype methods because
19+
// MDC clobbers the values otherwise.
20+
// See https://github.com/material-components/material-components-web/pull/6256
21+
1822
hasClass = (className: string): boolean => {
1923
return this._delegate._elementRef.nativeElement.classList.contains(className);
2024
}

0 commit comments

Comments
 (0)