Skip to content

Commit

Permalink
Merge pull request #28 from StephenTangCook/fix-users-select-people
Browse files Browse the repository at this point in the history
Provide default value for non standard field in users_select
  • Loading branch information
themashcodee authored Aug 13, 2024
2 parents 12ebdbb + c678ab8 commit c284252
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/elements/users_select_element.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@ type TextObjectProps = {
};

export const UsersSelectElement = (props: TextObjectProps) => {
const { action_id, focus_on_load, placeholder, type, confirm, initial_user, people } = props.data;
const {
action_id,
focus_on_load,
placeholder,
type,
confirm,
initial_user,
people = [],
} = props.data;
const [visible, setVisible] = useState(focus_on_load || false);
const [search, setSearch] = useState("");
const [selected, setSelected] = useState("");
Expand Down

0 comments on commit c284252

Please sign in to comment.