mirror of
https://github.com/lowdefy/lowdefy.git
synced 2025-01-30 13:50:55 +08:00
Merge pull request #521 from lowdefy/renderer-race-condition
fix(renderer): List render race condition, closes #520
This commit is contained in:
commit
0e82467443
@ -14,7 +14,7 @@
|
||||
limitations under the License.
|
||||
*/
|
||||
|
||||
import React, { Suspense, useEffect, useState } from 'react';
|
||||
import React, { Suspense, useState } from 'react';
|
||||
|
||||
import { ErrorBoundary } from '@lowdefy/block-tools';
|
||||
|
||||
|
@ -24,6 +24,7 @@ import Context from './Context';
|
||||
import List from './List';
|
||||
|
||||
const CategorySwitch = ({ block, Blocks, Component, context, lowdefy }) => {
|
||||
if (!block.eval) return null; // Renderer updates before eval is executed for the first time on lists. See #520
|
||||
if (block.eval.visible === false)
|
||||
return <div id={`vs-${block.blockId}`} style={{ display: 'none' }} />;
|
||||
|
||||
@ -34,8 +35,6 @@ const CategorySwitch = ({ block, Blocks, Component, context, lowdefy }) => {
|
||||
block={block}
|
||||
context={context}
|
||||
contextId={makeContextId({
|
||||
// TODO: remove branch
|
||||
branch: 'main',
|
||||
urlQuery: lowdefy.urlQuery,
|
||||
pageId: lowdefy.pageId,
|
||||
blockId: block.blockId,
|
||||
|
Loading…
Reference in New Issue
Block a user