mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-13 17:27:09 +00:00
Allow text fields next to range inputs be empty (yeah that's horrendous grammar but I'm very tired) (#273)
This commit is contained in:
@@ -13,6 +13,8 @@ export default class Range extends Component<Props, State> {
|
||||
@bind
|
||||
private onTextInput(event: Event) {
|
||||
const input = event.target as HTMLInputElement;
|
||||
const value = input.value.trim();
|
||||
if (!value) return;
|
||||
this.rangeWc!.value = input.value;
|
||||
const { onInput } = this.props;
|
||||
if (onInput) onInput(event);
|
||||
|
||||
Reference in New Issue
Block a user