Skip to content

Commit 27ed692

Browse files
authored
fix: Class Level Permissions dialog throws error TypeError: ce.current is null for newly created class (#2549)
1 parent 427bb3d commit 27ed692

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/dashboard/Data/Browser/Browser.react.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,7 @@ class Browser extends DashboardView {
368368
this.props.schema
369369
.dispatch(ActionTypes.CREATE_CLASS, { className })
370370
.then(() => {
371+
this.state.clp[className] = this.props.schema.data.get('CLPs').toJS()[className];
371372
this.state.counts[className] = 0;
372373
this.props.navigate(generatePath(this.context, 'browser/' + className));
373374
})
@@ -380,6 +381,7 @@ class Browser extends DashboardView {
380381
this.props.schema.dispatch(ActionTypes.DROP_CLASS, { className }).then(
381382
() => {
382383
this.setState({ showDropClassDialog: false });
384+
delete this.state.clp[className];
383385
delete this.state.counts[className];
384386
this.props.navigate(generatePath(this.context, 'browser'));
385387
},

src/dashboard/Data/Browser/BrowserToolbar.react.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ const BrowserToolbar = ({
341341
disabled={isPendingEditCloneRows}
342342
/>
343343
{onAddRow && <div className={styles.toolbarSeparator} />}
344-
{perms && enableSecurityDialog ? (
344+
{enableSecurityDialog ? (
345345
<SecurityDialog
346346
ref={clpDialogRef}
347347
disabled={!!relation || !!isUnique}

0 commit comments

Comments
 (0)