mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: update layout options after fetching settings
This commit is contained in:
parent
761c65830c
commit
2921f230bf
@ -40,8 +40,7 @@ export const NavbarIssueBoardView: FC<NavbarIssueBoardViewProps> = observer((pro
|
||||
|
||||
return (
|
||||
<>
|
||||
{issueLayoutViews &&
|
||||
Object.keys(issueLayoutViews).map((key: string) => {
|
||||
{Object.keys(issueLayoutViews).map((key: string) => {
|
||||
const layoutKey = key as TIssueLayout;
|
||||
if (layoutOptions[layoutKey]) {
|
||||
return (
|
||||
|
@ -38,13 +38,15 @@ export class PublishListStore implements IPublishListStore {
|
||||
*/
|
||||
fetchPublishSettings = async (anchor: string) => {
|
||||
try {
|
||||
const publishSettings = await this.publishService.fetchPublishSettings(anchor);
|
||||
const response = await this.publishService.fetchPublishSettings(anchor);
|
||||
runInAction(() => {
|
||||
if (publishSettings.anchor)
|
||||
set(this.publishMap, [publishSettings.anchor], new PublishStore(this.store, publishSettings));
|
||||
if (response.anchor && response.view_props) {
|
||||
this.store.issueFilter.updateLayoutOptions(response?.view_props);
|
||||
set(this.publishMap, [response.anchor], new PublishStore(this.store, response));
|
||||
}
|
||||
});
|
||||
|
||||
return publishSettings;
|
||||
return response;
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user