Merge pull request #1836 from lowdefy/develop

Release
This commit is contained in:
Gerrie van Wyk 2024-07-17 08:35:31 +02:00 committed by GitHub
commit ffe5005c05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 18 additions and 5 deletions

View File

@ -0,0 +1,5 @@
---
'@lowdefy/connection-mongodb': patch
---
Add MongoDbBulkWrite to MongoDBCollection requests.

View File

@ -0,0 +1,5 @@
---
'@lowdefy/blocks-antd': patch
---
Fix undefined property access in PhoneNumberInput component

View File

@ -73,9 +73,9 @@ function AddOnSelect({
mode="single"
notFoundContent={'Not found'}
onChange={(newVal) => {
const input = value?.input;
const region = uniqueValueOptions[newVal].value;
const phone_number = `${region.dial_code}${input}`;
const input = value?.input ?? '';
const region = uniqueValueOptions[newVal]?.value ?? {};
const phone_number = `${region?.dial_code ?? ''}${input}`;
methods.setValue({
input,
@ -207,8 +207,8 @@ const PhoneNumberInput = ({
input = input.replace(regex, properties.replaceInput.replacement ?? '');
}
const region = value.region;
const phone_number = `${region.dial_code}${input}`;
const region = value?.region ?? {};
const phone_number = `${region?.dial_code ?? ''}${input}`;
methods.setValue({
input,

View File

@ -15,6 +15,7 @@
*/
import MongoDBAggregation from './MongoDBAggregation/MongoDBAggregation.js';
import MongoDBBulkWrite from './MongoDBBulkWrite/MongoDBBulkWrite.js';
import MongoDBDeleteMany from './MongoDBDeleteMany/MongoDBDeleteMany.js';
import MongoDBDeleteOne from './MongoDBDeleteOne/MongoDBDeleteOne.js';
import MongoDBFind from './MongoDBFind/MongoDBFind.js';
@ -29,6 +30,7 @@ export default {
schema,
requests: {
MongoDBAggregation,
MongoDBBulkWrite,
MongoDBDeleteMany,
MongoDBDeleteOne,
MongoDBFind,

View File

@ -21,6 +21,7 @@ const schema = MongoDBCollection.schema;
test('All requests are present', () => {
expect(MongoDBCollection.requests.MongoDBAggregation).toBeDefined();
expect(MongoDBCollection.requests.MongoDBBulkWrite).toBeDefined();
expect(MongoDBCollection.requests.MongoDBDeleteMany).toBeDefined();
expect(MongoDBCollection.requests.MongoDBDeleteOne).toBeDefined();
expect(MongoDBCollection.requests.MongoDBFind).toBeDefined();