insomnia/packages/insomnia-app/app/ui/components
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
..
base fixes react controlled input error (#3391) 2021-05-19 08:24:01 -04:00
buttons [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
codemirror use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
dropdowns use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
editors use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
export-requests use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
graph-ql-explorer use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
key-value-editor use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
modals fixes react controlled input error (#3391) 2021-05-19 08:24:01 -04:00
panes use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
proto-file use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
settings Theme preview tile for OS themes (#3387) 2021-05-19 18:14:11 +12:00
sidebar use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
spec-editor use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
tags [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
templating use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
viewers use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
activity-toggle.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
analytics.tsx use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
check-for-updates-button.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
cookie-list.tsx use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
error-boundary.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
forms.stories.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
grpc-spinner.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
help-tooltip.stories.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
help-tooltip.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
hotkey.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
html-element-wrapper.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
keydown-binder.ts use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
markdown-editor.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
markdown-preview.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
notice.stories.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
notice.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
onboarding-container.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
page-layout.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
rendered-query-string.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
rendered-text.tsx use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
request-url-bar.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
response-timer.tsx ResponseTimer callstack exceeded (#3386) 2021-05-17 18:58:05 -05:00
sync-pull-button.tsx use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
time-from-now.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
toast.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
tooltip.stories.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
tooltip.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
unit-test-editable.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
workspace-page-header.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
wrapper-analytics.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
wrapper-debug.tsx use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
wrapper-design.tsx use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
wrapper-home.tsx [TypeScript] Phase 1 & 2 (#3370) 2021-05-12 18:35:00 +12:00
wrapper-migration.tsx sanitize all electron.shell.openExternal calls (#3336) 2021-05-12 16:20:52 -04:00
wrapper-onboarding.tsx use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
wrapper-unit-test.tsx use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00
wrapper.tsx use same array-type rule, project-wide (#3395) 2021-05-19 08:32:18 +12:00