Skip to content
Snippets Groups Projects
Select Git revision
  • e9cbcfc578d58748bb45e1355a5a3d9e4a1d24d8
  • master default protected
  • 1.31
  • 4.38.5
  • 4.38.4
  • 4.38.3
  • 4.38.2
  • 4.38.1
  • 4.38.0
  • 4.37.2
  • 4.37.1
  • 4.37.0
  • 4.36.0
  • 4.35.0
  • 4.34.1
  • 4.34.0
  • 4.33.1
  • 4.33.0
  • 4.32.2
  • 4.32.1
  • 4.32.0
  • 4.31.0
  • 4.30.1
23 results

focusmanager.mjs

Blame
  • 251.mjs 1.25 KiB
    /**
    * @file development/issues/open/251.mjs
    * @url https://gitlab.schukai.com/oss/libraries/javascript/monster/-/issues/251
    * @description investigate the reloading of select
    * @issue 251
    */
    
    import "../../../source/components/style/property.pcss";
    import "../../../source/components/style/link.pcss";
    import "../../../source/components/style/color.pcss";
    import "../../../source/components/style/theme.pcss";
    import "../../../source/components/style/normalize.pcss";
    import "../../../source/components/style/typography.pcss";
    import "../../../source/components/form/select.mjs";
    
    const select = document.createElement('monster-select');
    
    select.setOption('type', 'checkbox');
    select.setOption('mapping.labelTemplate', '${name} (${alpha-2})')
    select.setOption('mapping.valueTemplate', '${country-code}')
    select.setOption('filter.mode', 'options');
    select.setOption('filter.position', 'popper');
    
    
    select.importOptions([
        {
            "name": "United Kingdom",
            "alpha-2": "GB",
            "country-code": "826",
        },
        {
            "name": "Sweden",
            "alpha-2": "SE",
            "country-code": "752",
    
        },
        {
            "name": "Germany",
            "alpha-2": "DE",
            "country-code": "276",
        }
    ]);
    
    document.getElementById('uGhach43').appendChild(select);