Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/connect-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<!-- markdownlint-disable MD024 -->
# Changelog

# [1.0.0-preview.20] - 2025-01-16

- Check if a string prop is set instead of inspecting the contents of the string

# [1.0.0-preview.15] - 2024-12-18

- Emit dynamic props via `onUpdateDynamicProps`
Expand Down
6 changes: 3 additions & 3 deletions packages/connect-react/examples/nextjs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/connect-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/connect-react",
"version": "1.0.0-preview.19",
"version": "1.0.0-preview.20",
"description": "Pipedream Connect library for React",
"files": [
"dist"
Expand Down
15 changes: 6 additions & 9 deletions packages/connect-react/src/utils/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,13 @@ export function integerPropErrors(opts: ValidationOpts<ConfigurablePropInteger>)
}

export function stringPropErrors(opts: ValidationOpts<ConfigurablePropString>): string[] | undefined {
const _value = valueFromOption(opts.value)
const {
prop, value: valueOpt,
} = opts

if (!opts.prop.default) {
if (typeof _value === "undefined" || _value == null) return [
"required",
]
if (!String(_value).length) return [
"string must not be empty",
]
}
if (!prop.default && (valueOpt == null || typeof value === "undefined")) return [
"required",
]
}

type AppWithExtractedCustomFields = App & {
Expand Down
Loading