Replace setImmediate with setTimeout (#12614)
This commit is contained in:
parent
21ae29c002
commit
8b4e3e6647
21 changed files with 46 additions and 39 deletions
|
@ -126,7 +126,7 @@ const BulkRedactDialog: React.FC<Props> = (props) => {
|
|||
primaryButtonClass="danger"
|
||||
primaryDisabled={count === 0}
|
||||
onPrimaryButtonClick={() => {
|
||||
setImmediate(redact);
|
||||
setTimeout(redact, 0);
|
||||
onFinished(true);
|
||||
}}
|
||||
onCancel={() => onFinished(false)}
|
||||
|
|
|
@ -354,7 +354,7 @@ const ForwardDialog: React.FC<IProps> = ({ matrixClient: cli, event, permalinkCr
|
|||
placeholder={_t("forward|filter_placeholder")}
|
||||
onSearch={(query: string): void => {
|
||||
setQuery(query);
|
||||
setImmediate(() => {
|
||||
setTimeout(() => {
|
||||
const ref = context.state.refs[0];
|
||||
if (ref) {
|
||||
context.dispatch({
|
||||
|
|
|
@ -505,7 +505,7 @@ const SpotlightDialog: React.FC<IProps> = ({ initialText = "", initialFilter = n
|
|||
_setQuery(newQuery);
|
||||
};
|
||||
useEffect(() => {
|
||||
setImmediate(() => {
|
||||
setTimeout(() => {
|
||||
const ref = rovingContext.state.refs[0];
|
||||
if (ref) {
|
||||
rovingContext.dispatch({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue