-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
fix - add new button on opportunity board company picker doesnt work #8488
base: main
Are you sure you want to change the base?
Conversation
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.
PR Summary
This PR fixes the "New" button functionality in the opportunity board's company picker by implementing company creation and improving data fetching.
- Added company creation flow in
RecordBoardColumnNewOpportunity.tsx
usingcreateCompanyOpportunityAndOpenRightDrawer
function - Implemented right drawer opening after company creation with proper state management via
viewableRecordIdState
- Added
cache-and-network
fetch policy inuseFilteredSearchEntityQuery.ts
to ensure immediate visibility of newly created companies - Added error handling with
isDefined
checks for company creation responses
2 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
...bject-record/record-board/record-board-column/components/RecordBoardColumnNewOpportunity.tsx
Show resolved
Hide resolved
...bject-record/record-board/record-board-column/components/RecordBoardColumnNewOpportunity.tsx
Show resolved
Hide resolved
@@ -60,6 +60,7 @@ export const useFilteredSearchEntityQuery = ({ | |||
filter: notFilter, | |||
limit: limit ?? DEFAULT_SEARCH_REQUEST_LIMIT, | |||
searchInput: searchFilter, | |||
fetchPolicy: 'cache-and-network', |
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.
I am not sure about this one!
But the newly created entities won't get fetched without this.
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.
This should work out of the box, we shouldn't need to add this but maybe the optimistic effect isn't working properly for this request. It it's too time consuming, let's create an issue to solve that.
Is there an issue linked to this? Thanks! |
It seems like the add new button is itself removed! |
@ehconitin what do you mean? Do you have the issue link so I can remember? Thanks! |
LGTM for the code part, please create an issue for the optimistic rendering if you can't solve it easily in this PR. |
Closes #8455
opportunitybutton.mp4