Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoAndai committed May 23, 2024
1 parent 8d43e83 commit 7898446
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/data/joy/components/input/DebouncedInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Box from '@mui/joy/Box';
function DebounceInput(props) {
const { handleDebounce, debounceTimeout, ...rest } = props;

const timerRef = React.useRef();
const timerRef = React.useRef(undefined);

const handleChange = (event) => {
clearTimeout(timerRef.current);
Expand Down
2 changes: 1 addition & 1 deletion docs/data/joy/components/snackbar/SnackbarHideDuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function SnackbarHideDuration() {
const [open, setOpen] = React.useState(false);
const [duration, setDuration] = React.useState();
const [left, setLeft] = React.useState();
const timer = React.useRef();
const timer = React.useRef(undefined);
const countdown = () => {
timer.current = window.setInterval(() => {
setLeft((prev) => (prev === undefined ? prev : Math.max(0, prev - 100)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SaveIcon from '@mui/icons-material/Save';
export default function CircularIntegration() {
const [loading, setLoading] = React.useState(false);
const [success, setSuccess] = React.useState(false);
const timer = React.useRef();
const timer = React.useRef(undefined);

const buttonSx = {
...(success && {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Typography from '@mui/material/Typography';
export default function DelayingAppearance() {
const [loading, setLoading] = React.useState(false);
const [query, setQuery] = React.useState('idle');
const timerRef = React.useRef();
const timerRef = React.useRef(undefined);

React.useEffect(
() => () => {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/base-ui/api/use-autocomplete.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@
},
"unstable_isActiveElementInListbox": {
"type": {
"name": "(listbox: React.RefObject<HTMLElement>) => boolean",
"description": "(listbox: React.RefObject<HTMLElement>) => boolean"
"name": "(listbox: React.RefObject<HTMLElement | null>) => boolean",
"description": "(listbox: React.RefObject<HTMLElement | null>) => boolean"
}
},
"value": {
Expand Down
4 changes: 2 additions & 2 deletions docs/pages/base-ui/api/use-modal.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"parameters": {
"children": {
"type": {
"name": "React.ReactElement | undefined | null",
"description": "React.ReactElement | undefined | null"
"name": "React.ReactElement<any> | undefined | null",
"description": "React.ReactElement<any> | undefined | null"
},
"required": true
},
Expand Down

0 comments on commit 7898446

Please sign in to comment.