Skip to content

Conversation

@OsamaAlRashed
Copy link
Owner

This PR fixes several issues with the GridazorDropdown component and adds better support for dependent dropdowns:

Key Changes:

  1. Fixed valueFormatter:

    • Added proper handling for cases where cellEditorParams is a function
    • Improved handling of null/undefined values
    • More robust text lookup for display values
  2. Enhanced Remote Data Handling:

    • Preserved original searchUrl structure but improved request handling
    • Added better error handling for network requests
    • Added missing UI feedback for "no results" state
  3. Added Dependent Field Support:

    • Added resetDependentValue helper to properly handle parent-child relationships
    • When a parent field (e.g., category) changes, the child field (e.g., subcategory) is now automatically reset to null
    • Cell UI is properly refreshed to show the change immediately
  4. Code Organization:

    • Created a more robust gridazorDropdownHelper object that centralizes common functionality
    • Improved reusability of components

These changes ensure proper handling of dropdown dependency scenarios like the Category → Subcategory relationship, preventing invalid data states where a subcategory might remain selected even when it doesn't belong to the newly selected parent category.

@OsamaAlRashed OsamaAlRashed merged commit cd4be24 into master May 6, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants