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
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtFeb 12, 2026, 11:41 AM

Support ISO 2 country codes in CountryFlag component and grid column

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
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.