Skip to content

Commit b470f58

Browse files
default more button should be call
useForceUpdate hook
1 parent 911e202 commit b470f58

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/plugins/moreButtonPlugin/button/button.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState, useCallback, useRef, useEffect, useLayoutEffect } from 'react';
1+
import React, { useState, useCallback, useRef, useEffect } from 'react';
22
import PropTypes from 'prop-types';
33
export default function Button(getDeps, props) {
44
const { Popper, Api } = getDeps();
@@ -7,6 +7,7 @@ export default function Button(getDeps, props) {
77
const btnRef = useRef();
88
const popperRef = useRef();
99
const ref = useRef();
10+
props.components.useForceUpdate();
1011
ref.current = ref.current || Api.call(props.instance, props.components);
1112
useEffect(() => {
1213
const close = () => setOpen(false);

0 commit comments

Comments
 (0)