score:1
you can import cssproperties
interface from 'react' and cast the return value as cssproperties
of your control
key:
import react, { cssproperties } from 'react'
const inputstyle = {
control: () => ({
width: 200,
} as cssproperties),
}
it is because control
is stylefn
type which is:
type stylefn = (base: cssproperties, state: any) => cssproperties;
score:1
i believe you have a typo: the style
prop for select
should be styles
(the plural).
the style
(singular) property normally is supposed to be of type cssproperties
. but styles
(plural) is an object with function values that return cssproperties
. so typescript is helping you out there, albeit somewhat cryptically.
Source: stackoverflow.com
Related Query
- Why "No overload matches this call" TypeScript Error when using custom style in react-select?
- "No overload matches this call" error when setting up ContextApi & useReducer using Typescript
- Getting "No overload matches this call" error when using useQuery with TypeScript
- I am new in typescript When I compile my code given No overload matches this call error
- No overload matches this call and Types of parameters '__0' and 'props' are incompatible when passing custom params to library function on typescript
- Typescript Routing Error - No overload matches this call
- Typescript Error using react-daterange-picker "No overload matches this call."
- No overload matches this call Error while using css-in-js in Typescript, Webpack, React Project
- Typescript error with styled-components and AS TS2769: No overload matches this call
- Typescript error - No overload matches this call
- No overload matches this call in TypeScript when concatenating arrays of different signatures
- Typescript - 'No overload matches this call' when using fetched data and material-ui
- React + TypeScript error: No overload matches this call
- No overload matches this call when usign styled-components
- MUI v5 - Extending Typography variant in TypeScript creates error "No overload matches this call"
- No overload matches this call in Cors TypeScript
- Materia-ui and typescript No overload matches this call
- React-Router + Typescript error while wrapping component with Router "No overload matches this call"
- Typescript + React - No overload matches this call
- TypeScript and styled-components: No overload matches this call
- Switching to mui5 sx prop from makeStyles- typescript error (no overload matches this call) passing object with position
- Typescript papaparse No overload matches this call
- Property 'then' does not exist on type 'RelayObservable<unknown>'. when I try to fetch data using relay in react. I don't know why this error come
- Typescript ConnectedRouter No overload matches this call
- Typescript error when using custom palette color with Chip component in MUI v5
- No overload matches this call Error on TSX
- How to fix 'TS2769 No overload matches this call' when using react-leaflet
- Why this redux call is giving me error when refresh the page?
- Error on styled component instance with TypeScript: No overload matches this call
- Reducer Typescript Error: No overload matches this call
More Query from same tag
- React: Good Practices For CDNs, Node_Modules and Both
- Increase map max zoom level
- React App Fails to Compile Due to eslintrc File in a Distant Parent Directory
- How does Gatsby application access Azure Key Vault
- React Hook : Correct way of using custom hook to handle onClick Event?
- Display values from form submission to a DOM
- Unable to pass parameter in onclick event handler - React
- Typescript JSX : Understanding Ant Design ProForm syntax
- useEffect old data
- Export JSON as CSV with Papa Parse
- Await value before useEffect runs
- Filling multidimensional array in react
- API calling with NPM module 'got'
- React ref for a react element passed as a prop, dynamic event
- ReactJS transferring props to dynamic component
- best place to fetch data before rendering in react
- Is it possible to use dynamic object keys in useState in Reactjs?
- How to override the color of a react-bootstrap button (bsStyle)?
- Typescript declaration merging cause refers to a value, but is being used as a type here in react
- React: Adding props only to React component and not html tag (React.Children.map recursively)
- How to assign types of (typeof) all elements in the object to a variable in JavaScript | Typescript?
- How to fix `data-rbd-draggable-context-id` did not match. Server: "1" Client: "0"' with react-beautiful-dnd and next.js
- How can I combine multiple combineReducers functions in Redux using something like immutable.js
- React Bootstrap: set props on component dynamically
- How to continuously add objects to nested collection in Firestore
- Increment Object set javascript
- Why isn't my Radio button clickable?
- How to use length of response data to display buttons conditionally - React
- Problem updating parent state from child component in React
- How do I get user details in Firebase Storage?