-
-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SSR Support for Select component #268
Comments
Hello guys! Have a nice day! 👋 |
Another option would be to just import the Select Component on the client side only Example: import { Box, FormControl, InputLabel, MenuItem } from "@suid/material";
import { createSignal } from "solid-js";
import { clientOnly } from 'solid-start/islands';
const Select = clientOnly(() => import('@suid/material/Select'));
export default function StateSelect() {
const [age, setAge] = createSignal("");
const handleChange = (event) => {
setAge(event.target.value);
};
return (
<Box sx={{ minWidth: 120 }}>
<FormControl fullWidth>
<InputLabel id="demo-simple-select-label">Age</InputLabel>
<Select
labelId="demo-simple-select-label"
id="demo-simple-select"
value={age()}
label="Age"
onChange={handleChange}
>
<MenuItem value={10}>Ten</MenuItem>
<MenuItem value={20}>Twenty</MenuItem>
<MenuItem value={30}>Thirty</MenuItem>
</Select>
</FormControl>
</Box>
);
} |
Yeah, but with that we don't support ssr and instead disable it |
Hello,
I'm a student and we really need ssr support for this specific component in our project. I tried to do it my self but failed due to the harsh complexity, but @juanrgm as an experienced solid js developer should be able to pull this off. To get this fixed, I even sponsored 🙂
Just a quick overview of challenges I faced while trying to implementing this:
I would really appreciate any help, feedback or advice 💖
The text was updated successfully, but these errors were encountered: