Comments (2)
I have a similar issue that seems to be related to the react version. I have the same issue with the provided sample pro templates where it's not possible to build however it works when running in developer mode.
Depending on which react version that I use, I can get different results and different incopability problems. This is what I get when I use the default version from the blog-tailwind-nextjs sample project. I tested it to first rule out problem in my own code.
./src/app/blog-posts.tsx:39:8
Type error: Type '{ children: string; color: "gray"; className: string; size: "sm"; }' is missing the following properties from type 'Pick<ButtonProps, "children" | "color" | "translate" | "slot" | "style" | "title" | "onChange" | "onClick" | "className" | "key" | "defaultChecked" | "defaultValue" | ... 261 more ... | "loading">': placeholder, onPointerEnterCapture, onPointerLeaveCapture
37 | return (
38 | <section className="w-full max-w-6xl mx-auto flex flex-col items-center px-4 py-20">
> 39 | <Button color="gray" className="mb-3" size="sm">
| ^
40 | BLOG
41 | </Button>
42 | <Typography variant="h3" className="text-center" color="blue-gray">
from material-tailwind.
@bryanlundberg You need to add controller on top of component from react-hook-form.
import { FC } from "react";
import { Controller, FormProvider, useForm } from "react-hook-form";
import { Option, Select } from "@material-tailwind/react";
export interface IProps {
}
export const ProfileForm: FC<IProps> = () => {
const methods = useForm();
async function onSubmit(data: any) {
console.log("Submit:", data);
}
return (
<FormProvider {...methods}>
<form onSubmit={methods.handleSubmit(onSubmit)}>
<Controller
name="data"
control={methods.control}
render={({ field: { onChange, value } }) => (
<Select
name="data"
label="Select value"
value={value}
onChange={onChange}>
<Option value="demo1">Demo1</Option>
<Option value="demo2">Demo2</Option>
</Select>
)}/>
</form>
</FormProvider>
)
}
from material-tailwind.
Related Issues (20)
- Overriding certain classes on `Input` requires `!` (important tag)
- TypeScript Error: Props Missing on Material-Tailwind Components HOT 4
- Prop type warning for typography
- Not able to run material-tailwind repo on local getting 404 page not found HOT 2
- Feature request : on hover of social media icons in footer change bg color HOT 2
- Tooltip component is not working with React Icons
- Vite compatibility HOT 2
- typescript support got worst. HOT 2
- Dynamic value not loaded on Select Option component
- Select Component display wrong option after the option List related to it being changed
- look HOT 8
- Tailwind CSS Dark Mode classes are not working with material-tailwind.
- This bug is not solved yet. It took me hours to find out the what's happening. It's just a bug.
- The above error occurred in the <materialtailwind.dialog> component HOT 2
- Your website is broken
- Timeline Connector not always rendering HOT 1
- overflow x website
- AccordionBody state issue. HOT 1
- Menu, MenuList, MenuItem: following an anchor link on the same page immediately scrolls to the top
- Tree-shaking Material Taiwind
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 material-tailwind.