For AI agents: the complete documentation index is available at https://docs.dataplatform.ovh.net/llms.txt, the full documentation bundle is available at https://docs.dataplatform.ovh.net/llms-full.txt, and this page is available as Markdown at https://docs.dataplatform.ovh.net/sdk/app-dynamic_parameters-list-radio.md.
  • 🇬🇧 English
  • Radio

    Warning

    Rework pending, no delivery date. The Front App SDK (ReactJS) and the Front API SDK (NodeJS) are both being replaced. This page documents the current release, remains accurate, and is maintained until the replacement ships. Code written against it keeps working.

    The radio buttons allow you to choose one item from a defined list.

    Please refer to checkbox for a full reference.
    The differences are :

    • component : radio
    • default : that is a string and not an 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 : Allows to manually define the elements to display, the label will be displayed on the screen, the value will be displayed in the associated queries.
    • dictionary : load items automatically and dynamically from your DataPlant.
    • default : When you first see your radio buttons, this value will be selected.
    • reference : Specifies the name of the field to modify in the queries in the case of a transform of type "filter".

    Code example

    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