feat(google-sheets): create spreadsheet row
This commit is contained in:
@@ -4,7 +4,6 @@ import { useFormContext } from 'react-hook-form';
|
||||
import set from 'lodash/set';
|
||||
import type { UseFormReturn } from 'react-hook-form';
|
||||
import isEqual from 'lodash/isEqual';
|
||||
import omit from 'lodash/omit';
|
||||
import type {
|
||||
IField,
|
||||
IFieldDropdownSource,
|
||||
@@ -13,7 +12,7 @@ import type {
|
||||
|
||||
import { GET_DYNAMIC_DATA } from 'graphql/queries/get-dynamic-data';
|
||||
|
||||
const variableRegExp = /({.*?})/g;
|
||||
const variableRegExp = /({.*?})/;
|
||||
|
||||
function computeArguments(
|
||||
args: IFieldDropdownSource['arguments'],
|
||||
|
@@ -12,7 +12,7 @@ import type {
|
||||
|
||||
import { GET_DYNAMIC_FIELDS } from 'graphql/queries/get-dynamic-fields';
|
||||
|
||||
const variableRegExp = /({.*?})/g;
|
||||
const variableRegExp = /({.*?})/;
|
||||
|
||||
// TODO: extract this function to a separate file
|
||||
function computeArguments(
|
||||
@@ -64,7 +64,10 @@ function useDynamicFields(stepId: string | undefined, schema: IField) {
|
||||
const computedVariables = React.useMemo(() => {
|
||||
if (schema.type === 'dropdown' && schema.additionalFields) {
|
||||
try {
|
||||
const variables = computeArguments(schema.additionalFields.arguments, getValues);
|
||||
const variables = computeArguments(
|
||||
schema.additionalFields.arguments,
|
||||
getValues
|
||||
);
|
||||
|
||||
// if computed variables are the same, return the last computed variables.
|
||||
if (isEqual(variables, lastComputedVariables.current)) {
|
||||
|
Reference in New Issue
Block a user