Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using RemoteSelect in a table requests data twice, and the first Resource is not passed #4936

Open
ruanjf opened this issue Jul 23, 2024 · 2 comments

Comments

@ruanjf
Copy link

ruanjf commented Jul 23, 2024

* Describe the bug

Using RemoteSelect in a table requests data twice, and the first Resource is not passed

* Environment

  • NocoBase version: v1.2.22-alpha
  • Database type and version: SQLite
  • OS: MacOS
  • Deployment Methods: Create-nocobase-app
  • Docker image version:
  • NodeJS version: 18 LTS

* How To Reproduce

  1. create a collection
export default defineCollection({
  name: 'testA',
  title: 'testA',
  fields: [
    {
      type: 'integer',
      name: 'id',
      primaryKey: true,
      autoIncrement: true,
      allowNull: false,
      interface: 'id',
      uiSchema: {
        title: 'ID',
      },
    },
    {
      type: 'string',
      name: 'projectType',
      allowNull: false,
      interface: 'input',
      uiSchema: {
        title: '项目类型',
        type: 'string',
        'x-component': 'RemoteSelect',
        'x-component-props': {
          manual: false,
          fieldNames: {
            label: 'dictLabel',
            value: 'id',
          },
          service: {
            resource: 'dictItems',
            action: 'list',
            params: {
              filter: {
                dictionaryType: {
                  id: 'projectType',
                },
              },
              sort: ['dictSort', 'id']
            },
          },
        },
      },
    },
  ],
});
  1. run db2cm
const repo = this.db.getRepository<CollectionRepository>('collections');
await repo.db2cm('rbCompanies');
  1. config a table

Expected behavior

No 404 request address will appear

Screenshots

image

Logs

@ruanjf ruanjf changed the title 字段使用RemoteSelect 字段使用RemoteSelect时出现两次请求第一次未传递Resource Jul 23, 2024
@zhouyanliang
Copy link
Contributor

为方便所有用户交流,请按照模版里的说明,使用英文发布 issue。或者在社区对应的中文区发布:https://forum.nocobase.com/

@ruanjf
Copy link
Author

ruanjf commented Jul 25, 2024

@zhouyanliang edited

@ruanjf ruanjf changed the title 字段使用RemoteSelect时出现两次请求第一次未传递Resource Using RemoteSelect in a table requests data twice, and the first Resource is not passed Jul 25, 2024
@zhouyanliang zhouyanliang reopened this Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants