fomantic / Fomantic-UI-Docs

Official Documentation for Fomantic-UI
https://fomantic-ui.com
28 stars 85 forks source link

feat(dropdown): add values examples for change values behavior #347

Closed Ezra-Siton-UIX closed 2 years ago

Ezra-Siton-UIX commented 2 years ago

It is clearer that there is an example of how values ​​structure.

Without example I thought that this is the way to change values (like setup menu(values)):

Not working

$('.ui.dropdown').dropdown('change values', {
  values: [
    {
      name: 'Male (Not working example)',
      value: 'male',
    },
  ]
});

working

$('.ui.dropdown').dropdown('change values', [
  {
    name: 'Male',
    value: 'male',
  },
  {
    name: 'Female',
    value: 'female',
  }
]);