LearnNewsExamplesServices
Frontmatter
id9111
titleSupport ISO 2 country codes in CountryFlag component and grid column
stateClosed
labels
enhancementai
assigneestobiu
createdAtFeb 12, 2026, 10:12 AM
updatedAtFeb 12, 2026, 11:41 AM
githubUrlhttps://github.com/neomjs/neo/issues/9111
authortobiu
commentsCount1
parentIssue9106
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 12, 2026, 11:41 AM

Support ISO 2 country codes in CountryFlag component and grid column

Closed v12.0.0 enhancementai
tobiu
tobiu commented on Feb 12, 2026, 10:12 AM

Support ISO 2 country codes in CountryFlag component and grid column.

  1. src/component/CountryFlag.mjs:

    • Add countryCode_ reactive config.
    • Update afterSetLocation logic to prioritize countryCode for flag URL generation if available.
    • Use location for the text label.
  2. src/grid/column/CountryFlag.mjs:

    • Add contentField config (defaulting to 'location').
    • Update applyRecordConfigs to map countryCode from the record if available.
  3. apps/devindex/view/home/GridContainer.mjs:

    • Change the dataField for the 'Location' column from 'location' to 'country_code'.
    • Set sortable: false for this column.
tobiu added the enhancement label on Feb 12, 2026, 10:12 AM
tobiu added the ai label on Feb 12, 2026, 10:12 AM
tobiu assigned to @tobiu on Feb 12, 2026, 10:15 AM
tobiu added parent issue #9106 on Feb 12, 2026, 10:15 AM
tobiu referenced in commit 3e60dfb - "feat: Implement ISO country filtering in DevIndex and fix Store Turbo Mode filtering (#9111)" on Feb 12, 2026, 11:40 AM
tobiu
tobiu Feb 12, 2026, 11:41 AM

Input from Gemini 3 Pro:

✦ Implemented full support for ISO 2 country code filtering and rendering in DevIndex.

Framework Enhancements:

  • Neo.data.Store: Fixed a critical issue in Turbo Mode (autoInitRecords: false) where filtering during streaming (insertion) failed because raw data objects (POJOs) were not hydrated with mapped fields. Overridden isFilteredItem to resolve filter properties on the fly.
  • Neo.component.CountryFlag: Added countryCode_ and resolveCountryCode_ configs to support direct ISO code rendering without relying on location string parsing.
  • Neo.grid.column.CountryFlag: Added contentField config to separate the flag source (dataField) from the text label source.

App Implementation:

  • Store: Switched Contributors store to filter by country_code using exact match (===) instead of loose location search.
  • View: Updated GridContainer to use country_code for the Location column. Updated ControlsContainer to bind the Country combo to country_code and return the ISO code (valueField: 'code').
  • Logic: Ensured filter values are uppercased to match ISO standards in the data.

Verified that both initial loading with URL parameters and manual filtering now work correctly with the streaming grid.

tobiu closed this issue on Feb 12, 2026, 11:41 AM