-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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: JSONForm select/multiselect filterText value synchronous update with onFilterUpdate action #12578
Conversation
…nFilterUpdate action
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/get-appsmith/appsmith/AHNQx1brRigMusnjTi4LJKJXbsnU |
/ok-to-test sha=d30740e |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/2094685892. |
UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2094685892. Click to view performance test results
|
|
||
const debouncedUpdateProperty = useMemo( | ||
() => debounce(updateProperty, DEBOUNCE_TIMEOUT), | ||
[setMetaInternalFieldState, updateProperty], |
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.
Suggestion: we can remove setMetaInternalFieldState
from deps, since its a dep of updateProperty
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.
Ahh yes!
have triggered the failed jobs to again in CI. |
/ok-to-test sha=cc67d32 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/2100750608. |
UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2100750608. Click to view performance test results
|
@chandannkumar Can you share the app? I'm unable to reproduce it |
@chandannkumar I think it's a problem with the multi-select widget. I don't know if this is intentional or not. |
@ashit-rath this is definitely a bug |
@Tooluloope Thanks for the confirmation Note: Fixing this in the individual widget would fix the issue in JSONForm as well. |
/ok-to-test sha=98481e3 |
Tests running at: https://github.com/appsmithorg/appsmith/actions/runs/2113059051. |
UI Performance test run logs and artifacts: https://github.com/appsmithorg/appsmith/actions/runs/2113059051. Click to view performance test results
|
Tested this PR and working as expected |
Description
For a serverside enabled select/multiselect field type when an
onFilterUpdate
action is added, and within that action if the select/multiselect field'sfilterText
property ({{fieldState.select.filterText}}
) is used, when the action is trigger the action' function does not get the latest value of thefilterText
.Fixes #12545
Steps
Filterable
andServer Side Filtering
onFilterUpdate
{{showAlert('Filter update:'}}{{fieldState?.<fieldName>?.filterText)}}
(make sure to modify thefieldName
)Problem:
The update to the
filterText
always happened after the action was executed (the after update hook for updating meta was not being used).Fix:
Refactored the code to make the update of
filterText
in sync with the tigger of the action.Type of change
How Has This Been Tested?
Checklist:
Test coverage results 🧪
⚪ Total coverage has not changed