mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
working on tests
This commit is contained in:
@@ -231,6 +231,22 @@ export default class WaRange extends WebAwesomeFormAssociated {
|
||||
}
|
||||
}
|
||||
|
||||
formStateRestoreCallback(...args: Parameters<WebAwesomeFormAssociated['formStateRestoreCallback']>) {
|
||||
const [value, reason] = args;
|
||||
super.formStateRestoreCallback(value, reason);
|
||||
|
||||
/** @ts-expect-error Type widening issue due to what a formStateRestoreCallback can accept. */
|
||||
this.input.value = value;
|
||||
}
|
||||
|
||||
formResetCallback() {
|
||||
// @ts-expect-error We pass a Number, but it wants a string :shrug:
|
||||
this.input.value = this.defaultValue;
|
||||
this.value = this.defaultValue;
|
||||
|
||||
super.formResetCallback();
|
||||
}
|
||||
|
||||
render() {
|
||||
const hasLabelSlot = this.hasSlotController.test('label');
|
||||
const hasHelpTextSlot = this.hasSlotController.test('help-text');
|
||||
|
||||
Reference in New Issue
Block a user