-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Feature: Infinite scrolling for searching foreign key values in the ToolJet database. #9785
Feature: Infinite scrolling for searching foreign key values in the ToolJet database. #9785
Conversation
… infinite scroll logic on listing Foreign key data
Deployment: https://tooljet-pr-9785.onrender.com |
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.
}); | ||
} | ||
} | ||
let debouncedHandleSearchInSelectBox; | ||
if (scrollEventForColumnValus) { |
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.
spell error: Values
let scrollTop = target?.scrollTop; | ||
const scrollPercentage = ((scrollTop + target?.clientHeight) / target?.scrollHeight) * 100; | ||
const totalFKRecords = headers['content-range'].split('/')[1] || 0; | ||
if (Array.isArray(data) && data?.length > 0) { |
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.
can skip optional chaining
|
||
if (isFirstPageLoaded && offset >= totalRecords) return; | ||
setIsLoadingFKDetails(true); | ||
const referencedColumns = foreignKeys?.find((item) => item.column_names[0] === cellColumnName); |
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.
can we handle foreign keys missing instead of optional chaining?
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.
Try to handle null and undefined cases explicitly instead of relying on optional chaining as these null/undefined values will trickle down and make it hard to reason about code IMHO. Only use them if we can't predict the optional part at all.
…atabase for varchar datatype possible search results will be returned and for other datatype strict matching is followed
The merge-base changed after approval.
…ature/tjdb-fk-search-results-all-possible-cases
The merge-base changed after approval.
Deployment: https://tooljet-pr-9785.onrender.com |
…-foreignkeydata-tjdb
Deployment: https://tooljet-pr-9785.onrender.com |
* fix: filtered out null values and brought empty string to top in the foreign key drop down * fix: review comments addressed * fix: while creating or editing FK relation the source column drop down will not list empty column names * stylefix: cell was not clickable on empty string
Deployment: https://tooljet-pr-9785.onrender.com |
…-foreignkeydata-tjdb
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.
Good , it needed more about foreign key access please let me know.
Previously we don't support infinite scroll on searching the Foreign key values in ToolJet database. Now the ToolJet database has a feature that allows for infinite scrolling to search for foreign key values.