For AI agents: the complete documentation index is available at https://docs.dataplatform.ovh.net/ja/llms.txt, the full documentation bundle is available at https://docs.dataplatform.ovh.net/ja/llms-full.txt, and this page is available as Markdown at https://docs.dataplatform.ovh.net/ja/sdk/app-dynamic_parameters-list-radio.md.
  • 🇯🇵 日本語
  • ラジオボタン

    Warning

    再作業が保留中で、納期は未定です。 Front App SDK (ReactJS) と Front API SDK (NodeJS) の両方が置き換えられます。このページは現在のリリースを文書化し、置き換えが出荷されるまで正確であり、維持されます。これに対して書かれたコードは引き続き動作します。

    ラジオボタンを使用すると、定義されたリストから1つの項目を選択できます。

    チェックボックス を参照してください。 違いは以下の通りです :

    • component : radio
    • default : これはstringであり、arrayではありません
    {
      "id": "year",
      "type": "filter",
      "component": "radio",
      "reference": "year",
      "dictionary": "year",
      "default": "2020",
      "items": [
        {
          "value": "2020",
          "label": "Year 2020"
        },
        {
          "value": "2019",
          "label": "Year 2019"
        },
        {
          "value": "2018",
          "label": "Year 2018"
        }
      ]
    }
    • items : 表示する要素を手動で定義します。ラベルは画面に表示され、値は関連するクエリに表示されます。
    • dictionary : DataPlant から項目を自動的に動的に読み込みます。
    • default : ラジオボタンを最初に見たとき、この値が選択されます。
    • reference : クエリのフィールド名を指定します。フィルター型の変換の場合です。

    コード例

    import React from 'react'
    import FpDynamicParameter from 'forepaas/dynamic-parameter'
    import moment from 'moment'
    
    const myDynP =  {
      id: 'city',
      type: 'filter',
      component: 'radio',
      reference: 'city',
      dictionary: 'city'
    }
    class MyComponent extends React.Component {
      render () {
        return (
          <div className='hello-world'>
            <FpDynamicParameter dynamic-parameter={myDynP} />
          </div>
        )
      }
    }
    export default MyComponent