We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Vben Admin V5
formApi的getState()获取的schema为空数组 导致无法更新schema
updateSchema(schema: Partial<FormSchema>[]) { console.log('updateSchema', schema); const updated: Partial<FormSchema>[] = [...schema]; const hasField = updated.every( (item) => Reflect.has(item, 'fieldName') && item.fieldName, ); if (!hasField) { console.error( 'All items in the schema array must have a valid `fieldName` property to be updated', ); return; } // 这里获取的为空数组 const currentSchema = [...(this.state?.schema ?? [])];
const [BasicTable, tableApi] = useVbenVxeGrid({...}) onMouted(() => { // 获取的schema为空 console.log(tableApi.formApi.getState()); });
Binaries: Node: 20.16.0 - ~/.nvm/versions/node/v20.16.0/bin/node npm: 10.8.1 - ~/.nvm/versions/node/v20.16.0/bin/npm pnpm: 9.8.0 - ~/.nvm/versions/node/v20.16.0/bin/pnpm Browsers: Chrome: 129.0.6668.90 Safari: 18.0.1
No response
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Version
Vben Admin V5
Describe the bug?
formApi的getState()获取的schema为空数组 导致无法更新schema
Reproduction
System Info
Relevant log output
No response
Validations
The text was updated successfully, but these errors were encountered: