-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat(plugin-tools): ENG-12227 add remove button to ResourcesPickerButton #4510
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
4d02a45
feat(plugin-tools): add remove button to ResourcesPickerButton
Manish-Builder-io 0191646
update the onChange value
sanyamkamat 69d563c
Merge branch 'main' into feat/plugin-tools-remove-resource-button
sanyamkamat 9e09605
commit published versions
sanyamkamat 63b86d6
add package.json version changes
sanyamkamat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/plugin-tools/src/interfaces/custom-react-editor-props.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| export interface CustomReactEditorProps<T = any> { | ||
| value?: T; | ||
| onChange(val: T | undefined): void; | ||
| onChange(val: T | undefined | null): void; | ||
| context: any; | ||
| field?: any; | ||
| } | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
valuetype excludesnulldespiteonChangeaccepting itMedium Severity
The
onChangesignature was updated to acceptnull, butvalueremains typed asT | undefined(via the?modifier). After callingonChange(null), the framework will likely setvaluetonullon re-render, but the type doesn't reflect this. Consumers checkingtypeof value === 'undefined'to detect an unset state (as done inResourcesList.tsx) would incorrectly treatnullas a set value. Thevaluetype needs to includenullto match theonChangecontract.Reviewed by Cursor Bugbot for commit 9e09605. Configure here.