insomnia/packages/insomnia-app/app/ui
Dimitri Mitropoulos 860565f3a6
fixes react controlled input error (#3391)
* fix ts-expect-error

* removes useless await

see https://github.com/typescript-eslint/typescript-eslint/blob/master/packages/eslint-plugin/docs/rules/await-thenable.md

We're not quite ready to have this rule on everywhere, but in this case I can see that it's correct to follow.

* add comment about magic number

and moves the assignment to the one place it's used

I opted not to make a ticket because we are recently running out of tickets and this seems to be a relatively small thing @reynolek please confirm this is the correct course of action.

* initialize ref to reflect reality (and include actual type)

* fixes root cause of error, inlines one-liners

the error with the type of `_handleInputColorChange` was due to `onChange` being the wrong prop to use (where `onChange` is the one we want).

* use onChange instead of onInput to access correct types

ultimately, since react's behavior diverged from the DOM behavior to match onInput, this should have no effect on any functionality since react assigns this event to `onChange` anyway.  see https://github.com/facebook/react/blob/master/fixtures/attribute-behavior/src/attributes.js#L2089

* clears remaining ts-expect-errors in file

* updates fallback call per review feedback
2021-05-19 08:24:01 -04:00
..
components fixes react controlled input error (#3391) 2021-05-19 08:24:01 -04:00
containers use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
context use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
css Theme preview tile for OS themes (#3387) 2021-05-19 18:14:11 +12:00
images Remove Core and Designer specific cases (#3034) 2021-02-03 12:19:22 +13:00
redux use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
dnd-backend.ts [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
index.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00