Comments (9)
Added PR to DefinitelyTyped: DefinitelyTyped/DefinitelyTyped#43079
from mui.
Awesome! Thanks! Let me know when it gets merged and then we'll close this issue.
from mui.
Thanks for creating this issue. Are you currently running into this problem? Can you provide an example snippet?
from mui.
import React from "react";
import ReactDOM from "react-dom";
import { Input } from "muicss/react";
function App() {
return <Input inputRef={() => console.log("hi")} />;
}
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);
You should see an error in the console to the effect of TypeError: this.controlEl is undefined
or Cannot set property _muiTextfield on undefined
https://codesandbox.io/s/quirky-wilbur-je6eg
The sandbox generates a lot of extra error output that's not helpful but the real error should be in there somewhere.
from mui.
@amorey, @download13: I encountered this issue as well. Proposed solution in #315
from mui.
Have you tried using the ref
attribute to access the control element instead? Here's an example in the documentation for uncontrolled components:
https://www.muicss.com/docs/v1/react/input
from mui.
Thanks @amorey: that works as well but could we then add controlEl
to the typescript definition for Input
?
from mui.
Sure, though I'm not familiar with typescript. Can you submit a PR or show me how to add it?
from mui.
Hi @amorey: sorry for the delayed response. I'll try to add it.
from mui.
Related Issues (20)
- npm run build-e2e-tests fails with an error HOT 2
- WebComponents part is outdated? Should we perfect it? HOT 1
- Label in input form not properly visualized HOT 2
- React Dividers example broken? HOT 1
- Configuration via mocha.opts is DEPRECATED HOT 2
- Clarify or change behavior of Tabs in CSS/JS HOT 3
- How we can update the muicss docs? HOT 3
- Outlined text HOT 2
- Dark mode support via automatic CSS media query prefers-color-scheme HOT 1
- limit size of select menu HOT 4
- Is this repo still being maintained? HOT 1
- Required validation for select HOT 2
- Reset form input validation HOT 4
- select with multiple attribute HOT 2
- Make tab hidden/visible on some criteria HOT 2
- MUI hacked? Github Repo has only a 0.10.2 tag and the website and NPM show a 0.10.3 version. HOT 1
- Support for react 17 HOT 5
- Bugs in negated `in` expressions
- [Autocomplete] How to implement? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mui.