Add policies listing page
Signed-off-by: Bryan Frimin <bryan@getprobo.com> Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
committed by
Sacha Al Himdani
parent
7903bd3a77
commit
abe0ce1dde
@@ -20,11 +20,12 @@ export function ControlledField({
|
||||
name={name}
|
||||
render={({ field }) => (
|
||||
<>
|
||||
{/* @ts-expect-error field is too dynamic */}
|
||||
<Field
|
||||
{...props}
|
||||
{...field}
|
||||
// TODO : Find a better way to handle this case (comparing number and string for select create issues)
|
||||
value={field.value ? field.value.toString() : null}
|
||||
value={field.value ? field.value.toString() : ""}
|
||||
onValueChange={field.onChange}
|
||||
/>
|
||||
</>
|
||||
@@ -48,6 +49,7 @@ export function ControlledSelect({
|
||||
{...props}
|
||||
{...field}
|
||||
onValueChange={field.onChange}
|
||||
value={field.value ?? ""}
|
||||
/>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -72,8 +72,9 @@ function PeopleSelectWithQuery({
|
||||
variant="editor"
|
||||
placeholder={__("Select an owner")}
|
||||
onValueChange={field.onChange}
|
||||
key={people?.length ?? 0}
|
||||
key={people?.length.toString() ?? "0"}
|
||||
{...field}
|
||||
value={field.value ?? ""}
|
||||
>
|
||||
{people?.map((p) => (
|
||||
<Option key={p.id} value={p.id} className="flex gap-2">
|
||||
|
||||
Reference in New Issue
Block a user