Skip to content
Snippets Groups Projects
Select Git revision
  • 60a6e7952bdc5f71639933c3521635b3cb7a0fd4
  • master default protected
  • v1.16.5
  • v1.16.4
  • v1.16.3
  • v1.16.2
  • v1.16.1
  • v1.16.0
  • v1.15.0
  • v1.14.0
  • v1.13.2
  • v1.13.1
  • v1.13.0
  • v1.12.0
  • v1.11.0
  • v1.10.2
  • v1.10.1
  • v1.10.0
  • v1.9.0
  • v1.8.3
  • v1.8.2
  • v1.8.1
22 results

command_test.go

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);