Skip to content

Commit

Permalink
Merge branch 'main' into add-series-acl-to-event-config-option
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnei committed May 28, 2024
2 parents 97c7491 + 8326e52 commit 57fc782
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ If you want to authenticate using different credentials, you can specify them
in the `PROXY_AUTH` variable in the format `user:password`, as in

```sh
PROXY_TARGET=http://localhost:8080 PROXY_AUTH=jdoe:aligator3 npm run client
PROXY_TARGET=http://localhost:8080 PROXY_AUTH=jdoe:aligator3 npm start
```

Note that `PROXY=1` is not required if you specify either `PROXY_TARGET` or `PROXY_AUTH`.
Expand Down
16 changes: 8 additions & 8 deletions src/components/shared/wizard/RenderField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ const RenderField = ({
const handleKeyDown = (event, type) => {
const { key } = event;
// keys pressable for leaving edit mode
const keys = ["Escape", "Enter"];
const keys = ["Escape", "Tab", "Enter"];

if ((type !== "textarea" || type !== "select") && keys.indexOf(key) > -1) {
if (type !== "textarea" && keys.indexOf(key) > -1) {
setEditMode(false);
}
};
Expand Down Expand Up @@ -209,7 +209,7 @@ const EditableDateValue = ({
/>
</div>
) : (
<div onFocus={() => setEditMode(true)} className="show-edit" tabIndex={0}>
<div onClick={() => setEditMode(true)} className="show-edit">
<span className="editable preserve-newlines">
<RenderDate date={text} />
</span>
Expand Down Expand Up @@ -263,13 +263,13 @@ const EditableSingleSelect = ({
// @ts-expect-error TS(7006): Parameter 'element' implicitly has an 'any' type.
handleChange={(element) => setFieldValue(field.name, element.value)}
placeholder={`-- ${t("SELECT_NO_OPTION_SELECTED")} --`}
tabIndex={-1}
tabIndex={10}
autoFocus={true}
defaultOpen={true}
/>
</div>
) : (
<div onFocus={() => setEditMode(true)} className="show-edit" tabIndex={0}>
<div onClick={() => setEditMode(true)} className="show-edit">
<span className="editable preserve-newlines">
{text || t("SELECT_NO_OPTION_SELECTED")}
</span>
Expand Down Expand Up @@ -317,7 +317,7 @@ const EditableSingleValueTextArea = ({
/>
</div>
) : (
<div onFocus={() => setEditMode(true)} className="show-edit" tabIndex={0}>
<div onClick={() => setEditMode(true)} className="show-edit">
<span className="editable preserve-newlines">{text || ""}</span>
<div>
<i className="edit fa fa-pencil-square" />
Expand Down Expand Up @@ -359,7 +359,7 @@ const EditableSingleValue = ({
<input {...field} autoFocus={true} type="text" />
</div>
) : (
<div onFocus={() => setEditMode(true)} className="show-edit" tabIndex={0}>
<div onClick={() => setEditMode(true)} className="show-edit">
<span className="editable preserve-newlines">{text || ""}</span>
<div>
<i className="edit fa fa-pencil-square" />
Expand Down Expand Up @@ -417,7 +417,7 @@ const EditableSingleValueTime = ({
/>
</div>
) : (
<div onFocus={() => setEditMode(true)} className="show-edit" tabIndex={0}>
<div onClick={() => setEditMode(true)} className="show-edit">
<span className="editable preserve-newlines">
{t("dateFormats.dateTime.short", { dateTime: new Date(text) }) || ""}
</span>
Expand Down
7 changes: 2 additions & 5 deletions src/components/shared/wizard/RenderMultiField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ const RenderMultiField = ({
collection={fieldInfo.collection}
field={field}
fieldValue={fieldValue}
setEditMode={setEditMode}
inputValue={inputValue}
removeItem={removeItem}
handleChange={handleChange}
Expand Down Expand Up @@ -125,8 +124,6 @@ const RenderMultiField = ({

// Renders multi select
const EditMultiSelect = ({
// @ts-expect-error TS(7031): Binding element 'setEditMode' implicitly has an 'a... Remove this comment to see the full error message
setEditMode,
// @ts-expect-error TS(7031): Binding element 'collection' implicitly has an 'an... Remove this comment to see the full error message
collection,
// @ts-expect-error TS(7031): Binding element 'handleKeyDown' implicitly has an ... Remove this comment to see the full error message
Expand Down Expand Up @@ -159,7 +156,7 @@ const EditMultiSelect = ({

return (
<>
<div onBlur={() => setEditMode(false)} ref={childRef}>
<div ref={childRef}>
<div>
<input
type="text"
Expand Down Expand Up @@ -255,7 +252,7 @@ const ShowValue : React.FC<{
fieldValue,
}) => {
return (
<div onFocus={() => setEditMode(true)} className="show-edit" tabIndex={0}>
<div onClick={() => setEditMode(true)} className="show-edit">
{field.value instanceof Array && field.value.length !== 0 ? (
<ul>
{/* @ts-expect-error TS(7006): Parameter 'item' implicitly has an 'any' type. */}
Expand Down

0 comments on commit 57fc782

Please sign in to comment.