Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions src/collections/sistent/components/select/code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { FormControl, Select, MenuItem, InputLabel, OutlinedInput, ListSubheader
export const BasicSelectCodeDemo = ({ variant, ...props }) => {
return (
<FormControl sx={{ width: "200px" }} variant={variant} {...props}>
<Select defaultValue={10} {...props}>
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }} defaultValue={10} {...props}>
<MenuItem value={10}>Ten</MenuItem>
<MenuItem value={20}>Twenty</MenuItem>
<MenuItem value={30}>Thirty</MenuItem>
Expand All @@ -23,7 +23,7 @@ export const BasicSelectCodeDemo = ({ variant, ...props }) => {
export const AutoWidthSelectCodeDemo = () => {
return (
<FormControl sx={{ minWidth: "120px" }}>
<Select defaultValue={10} autoWidth>
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }} defaultValue={10} autoWidth>
<MenuItem value={10}>Ten</MenuItem>
<MenuItem value={20}>Twenty</MenuItem>
<MenuItem value={30}>Thirty</MenuItem>
Expand All @@ -35,7 +35,7 @@ export const AutoWidthSelectCodeDemo = () => {
export const FullWidthSelectCodeDemo = () => {
return (
<FormControl fullWidth>
<Select defaultValue={10} fullWidth>
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }} defaultValue={10} fullWidth>
<MenuItem value={10}>Ten</MenuItem>
<MenuItem value={20}>Twenty</MenuItem>
<MenuItem value={30}>Thirty</MenuItem>
Expand All @@ -48,7 +48,7 @@ export const LabelSelectCodeDemo = () => {
return (
<FormControl sx={{ width: "200px" }}>
<InputLabel id="demo-select-label">Age</InputLabel>
<Select
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }}
labelId="demo-select-label"
id="demo-select"
label="Age"
Expand All @@ -64,7 +64,7 @@ export const LabelSelectCodeDemo = () => {
export const HelperSelectCodeDemo = () => {
return (
<FormControl sx={{ width: "200px" }}>
<Select defaultValue={10}>
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }} defaultValue={10}>
<MenuItem value={10}>Ten</MenuItem>
<MenuItem value={20}>Twenty</MenuItem>
<MenuItem value={30}>Thirty</MenuItem>
Expand All @@ -78,7 +78,7 @@ export const PlaceholderSelectCodeDemo = () => {
const [selectedAge, setSelectedAge] = useState("");
return (
<FormControl sx={{ width: "200px" }}>
<Select
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }}
id="demo-select-placeholder"
onChange={(e) => setSelectedAge(e.target.value)}
renderValue={() => {
Expand All @@ -99,7 +99,7 @@ export const PlaceholderSelectCodeDemo = () => {
export const GroupingSelectCodeDemo = () => {
return (
<FormControl sx={{ width: "200px" }}>
<Select defaultValue={10}>
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }} defaultValue={10}>
<ListSubheader muiSkipListHighlight>Group 1</ListSubheader>
<MenuItem value={10}>Ten</MenuItem>
<MenuItem value={20}>Twenty</MenuItem>
Expand All @@ -118,14 +118,14 @@ export const BehaviorSelectCodeDemo = () => {
return (
<Grid container spacing={2} sx={{ justifyContent: "center" }}>
<FormControl sx={{ width: "200px" }} disabled>
<Select defaultValue={10}>
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }} defaultValue={10}>
<MenuItem value={10}>Ten</MenuItem>
<MenuItem value={20}>Twenty</MenuItem>
<MenuItem value={30}>Thirty</MenuItem>
</Select>
</FormControl>
<FormControl sx={{ width: "200px" }} error>
<Select defaultValue={10}>
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }} defaultValue={10}>
<MenuItem value={10}>Ten</MenuItem>
<MenuItem value={20}>Twenty</MenuItem>
<MenuItem value={30}>Thirty</MenuItem>
Expand All @@ -139,7 +139,7 @@ export const RequiredSelectCodeDemo = () => {
return (
<FormControl sx={{ width: "200px" }} required>
<InputLabel id="demo-select-label-required">Age</InputLabel>
<Select
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }}
labelId="demo-select-label-required"
id="demo-select-required"
label="Age"
Expand All @@ -159,7 +159,7 @@ export const MultipleSelectCodeDemo = () => {
};
return (
<FormControl sx={{ width: "200px" }}>
<Select
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }}
multiple
input={<OutlinedInput label="Name" />}
value={multipleAges}
Expand Down
12 changes: 6 additions & 6 deletions src/collections/sistent/components/select/guidance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const StateSelectDemo = (props) => {
return (
<FormControl sx={{ width: "200px" }} {...props}>
<InputLabel id="demo-simple-select-state-label">Age</InputLabel>
<Select
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }}
labelId="demo-simple-select-state-label"
id="demo-simple-select-state"
value={age}
Expand Down Expand Up @@ -43,7 +43,7 @@ export const HelperSelectDemo = () => {
>
<FormControl sx={{ width: "200px" }}>
<InputLabel id="demo-select-label">Age</InputLabel>
<Select
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }}
labelId="demo-select-label"
id="demo-select"
label="Age"
Expand All @@ -55,7 +55,7 @@ export const HelperSelectDemo = () => {
<FormHelperText>With label + Helper text</FormHelperText>
</FormControl>
<FormControl sx={{ width: "200px" }}>
<Select id="demo-select-without-label">
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }} id="demo-select-without-label">
<MenuItem value={10}>Ten</MenuItem>
<MenuItem value={20}>Twenty</MenuItem>
<MenuItem value={30}>Thirty</MenuItem>
Expand All @@ -71,7 +71,7 @@ export const PlaceholderSelectDemo = () => {
const handleChange = (event) => setAge(event.target.value);
return (
<FormControl sx={{ width: "200px" }}>
<Select
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }}
id="demo-select-placeholder"
value={age}
onChange={handleChange}
Expand All @@ -95,7 +95,7 @@ export const GroupingSelectDemo = () => {
return (
<FormControl sx={{ width: "200px" }}>
<InputLabel id="demo-select-label-grouped">Age</InputLabel>
<Select
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }}
labelId="demo-select-label-grouped"
id="demo-select-grouped"
label="Age"
Expand Down Expand Up @@ -123,7 +123,7 @@ export const MultipleSelectDemo = () => {
return (
<FormControl sx={{ width: "200px" }}>
<InputLabel id="demo-multiple-name-label">Age</InputLabel>
<Select
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }}
multiple
labelId="demo-multiple-name-label"
id="demo-multiple-name"
Expand Down
10 changes: 5 additions & 5 deletions src/collections/sistent/components/select/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const BasicSelectDemo = ({ variant, ...props }) => {
return (
<FormControl sx={{ width: "200px" }} variant={variant} {...props}>
<InputLabel id={labelId}>Age</InputLabel>
<Select
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }}
labelId={labelId}
id={`demo-select-${variant || 'outlined'}`}
value={age}
Expand All @@ -37,7 +37,7 @@ export const AutoWidthSelectDemo = () => {
return (
<FormControl sx={{ minWidth: "120px", m: 1 }}>
<InputLabel id="demo-simple-select-autowidth-label">Age</InputLabel>
<Select
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }}
labelId="demo-simple-select-autowidth-label"
id="demo-simple-select-autowidth"
value={age}
Expand All @@ -59,7 +59,7 @@ export const SmallSelectDemo = () => {
return (
<FormControl sx={{ minWidth: "80px", m: 1 }} size="small">
<InputLabel id="demo-simple-select-small-label">Age</InputLabel>
<Select
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }}
labelId="demo-simple-select-small-label"
id="demo-simple-select-small"
value={age}
Expand All @@ -80,7 +80,7 @@ export const FullWidthSelectDemo = () => {
return (
<FormControl fullWidth sx={{ m: 1 }}>
<InputLabel id="demo-simple-select-fullwidth-label">Age</InputLabel>
<Select
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }}
labelId="demo-simple-select-fullwidth-label"
id="demo-simple-select-fullwidth"
value={age}
Expand All @@ -104,7 +104,7 @@ export const MultipleSelectDemo = () => {
return (
<FormControl sx={{ width: "200px" }}>
<InputLabel id="demo-multiple-name-label">Age</InputLabel>
<Select
<Select MenuProps={{ disableScrollLock: true, marginThreshold: null }}
labelId="demo-multiple-name-label"
id="demo-multiple-name"
multiple
Expand Down
Loading