Skip to content

Commit

Permalink
[5.x] Form fields should continue to output a key/value array (#10648)
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean authored Aug 16, 2024
1 parent 3372968 commit 7b52088
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Fieldtypes/HasSelectOptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,4 +212,13 @@ private function multiSelectGqlType()
},
];
}

public function extraRenderableFieldData(): array
{
return [
'options' => collect($this->getOptions())
->mapWithKeys(fn ($option) => [$option['value'] => $option['label']])
->all(),
];
}
}

0 comments on commit 7b52088

Please sign in to comment.