diff --git a/README.md b/README.md index e44a105379..0570c8e52c 100644 --- a/README.md +++ b/README.md @@ -8,8 +8,8 @@ NocoBase is in early stage of development and is subject to frequent changes, pl ## Recent major updates -- [v0.19: Application process optimization - 2014/01/08](https://blog.nocobase.com/posts/release-v019/) -- [v0.18: Establish a sound testing system - 2013/12/21](https://blog.nocobase.com/posts/release-v018/) +- [v0.19: Application process optimization - 2024/01/08](https://blog.nocobase.com/posts/release-v019/) +- [v0.18: Establish a sound testing system - 2023/12/21](https://blog.nocobase.com/posts/release-v018/) - [v0.17: New SchemaInitializer and SchemaSettings - 2023/12/11](https://blog.nocobase.com/posts/release-v017/) - [v0.16: New cache manager - 2023/11/20](https://blog.nocobase.com/posts/release-v016/) - [v0.15: New plugin settings manager - 2023/11/13](https://blog.nocobase.com/posts/release-v015/) diff --git a/packages/core/client/src/block-provider/TableBlockProvider.tsx b/packages/core/client/src/block-provider/TableBlockProvider.tsx index 7829612acb..6663c512b8 100644 --- a/packages/core/client/src/block-provider/TableBlockProvider.tsx +++ b/packages/core/client/src/block-provider/TableBlockProvider.tsx @@ -174,11 +174,7 @@ export const useTableBlockProps = () => { ctx.service.refresh(); }, onChange({ current, pageSize }, filters, sorter) { - const sort = sorter.order - ? sorter.order === `ascend` - ? [sorter.field] - : [`-${sorter.field}`] - : globalSort || ctx.service.params?.[0]?.sort; + const sort = sorter.order ? (sorter.order === `ascend` ? [sorter.field] : [`-${sorter.field}`]) : globalSort; ctx.service.run({ ...ctx.service.params?.[0], page: current, pageSize, sort }); }, onClickRow(record, setSelectedRow, selectedRow) { diff --git a/packages/plugins/@nocobase/plugin-api-doc/src/client/Document.tsx b/packages/plugins/@nocobase/plugin-api-doc/src/client/Document.tsx index c7ee6806f0..b515fcdfb3 100644 --- a/packages/plugins/@nocobase/plugin-api-doc/src/client/Document.tsx +++ b/packages/plugins/@nocobase/plugin-api-doc/src/client/Document.tsx @@ -12,13 +12,13 @@ const Documentation = () => { const apiClient = useAPIClient(); const { t } = useTranslation(); const swaggerUIRef = useRef(); - const { data: urls } = useRequest<{ data: { name: string; url: string }[] }>({ url: 'swagger:getUrls' }); const requestInterceptor = (req) => { if (!req.headers['Authorization']) { const match = location.pathname.match(/^\/apps\/([^/]*)\//); - // multi apps need to set X-App header - req.headers['X-App'] = match?.[1] || 'main'; + if (match?.[1]) { + req.headers['X-App'] = match?.[1]; + } req.headers['Authorization'] = `Bearer ${apiClient.auth.getToken()}`; } return req;