Skip to content

Commit

Permalink
fix small things reported by tests as warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred Lefévère-Laoide authored and Fred Lefévère-Laoide committed Jul 17, 2024
1 parent f118c59 commit 3023990
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
4 changes: 2 additions & 2 deletions frontend/taipy-gui/src/components/Taipy/Login.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ const closeSx: SxProps<Theme> = {
alignSelf: "start",
};
const titleSx = { m: 0, p: 2, display: "flex", paddingRight: "0.1em" };
const userProps = { autocomplete: "username" };
const pwdProps = { autocomplete: "current-password" };
const userProps = { autoComplete: "username" };
const pwdProps = { autoComplete: "current-password" };

const Login = (props: LoginProps) => {
const { id, title = "Log-in", onAction = "on_login", message, defaultMessage } = props;
Expand Down
2 changes: 1 addition & 1 deletion frontend/taipy-gui/src/components/Taipy/Selector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ const getOptionLabel = (option: LovItem) => (typeof option.item === "string" ? o
const getOptionKey = (option: LovItem) => "" + option.id;
const isOptionEqualToValue = (option: LovItem, value: LovItem) => option.id == value.id;
const renderOption = (props: HTMLAttributes<HTMLLIElement>, option: LovItem) => (
<li {...props}>{typeof option.item === "string" ? option.item : <LovImage item={option.item} />}</li>
<li {...props} key={option.id}>{typeof option.item === "string" ? option.item : <LovImage item={option.item} />}</li>
);

const getLovItemsFromStr = (value: string | string[] | undefined, lovList: LovItem[], multiple: boolean) => {
Expand Down
8 changes: 1 addition & 7 deletions frontend/taipy-gui/src/components/Taipy/TableFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,7 @@ const FilterRow = (props: FilterRowProps) => {
);
const onDateChange = useCallback(
(v: Date | null) => {
let dv;
try {
dv = v?.toISOString() || "";
} catch (e) {
dv = "";
console.info("TableFilter.onDateChange", v);
}
const dv = (!(v instanceof Date) || isNaN(v.valueOf())) ? "": v.toISOString();
setVal(dv);
setEnableCheck(!!getFilterDesc(columns, colId, action, dv));
},
Expand Down

0 comments on commit 3023990

Please sign in to comment.