Skip to content
Snippets Groups Projects
Select Git revision
  • 2fb8420b0ade42f185ebb9ea0e38e25cf2006cfb
  • master default protected
  • v1.23.2
  • v1.23.1
  • v1.23.0
  • v1.22.0
  • v1.21.1
  • v1.21.0
  • v1.20.3
  • v1.20.2
  • v1.20.1
  • v1.20.0
  • v1.19.4
  • v1.19.3
  • v1.19.2
  • v1.19.1
  • v1.19.0
  • v1.18.2
  • v1.18.1
  • v1.18.0
  • v1.17.0
  • v1.16.1
22 results

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