Giter Club home page Giter Club logo

Comments (3)

BierDav avatar BierDav commented on June 12, 2024

Hello guys!
There is an update on this topic from my side. I have been working on a version of that component on my own to support SSR and dynamic ranges. You can check it out here 🤓 Unfortunately, it currently doesn't support autofocus. I don't think it is a big technical issue, but the first attempt I gave it didn't work and I don't have enough time to fix that, because for us it is good enough. Also, the API is a bit different to MUI, but feels quite similar other than solid-select which might seam quite limiting. 😉

Have a nice day! 👋
BierDav

from suid.

YannickFuereder avatar YannickFuereder commented on June 12, 2024

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>
  );
}

from suid.

BierDav avatar BierDav commented on June 12, 2024

Yeah, but with that we don't support ssr and instead disable it

from suid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.