Skip to content

Commit

Permalink
Merge pull request #505 from Lemoncode/fixaccessibilitybug/canvas-list
Browse files Browse the repository at this point in the history
Fixed minor bugs
  • Loading branch information
brauliodiez committed Jun 18, 2024
2 parents 5a7c37e + b1bd029 commit b2889e2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@
font-weight: 600;
letter-spacing: 0.2px;
font-size: 20px;
cursor: pointer;
}
.info__group {
display: flex;
Expand Down
3 changes: 2 additions & 1 deletion src/common/a11y/select/select.hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ export const useA11ySelect = <Option>(
);
};

useOnKey(buttonRef, ['ArrowDown', 'ArrowUp'], () => {
useOnKey(buttonRef, ['ArrowDown', 'ArrowUp'], (e: KeyboardEvent) => {
e.preventDefault();
if (!isOpen) {
setIsOpen(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ export const CollectionAccessible: React.FC<Props> = props => {
</ul>
) : null}
<h4>Fields for {table.tableName} collection</h4>
<FieldList fieldList={table.fields} listName={table.tableName} />
<ul>
<FieldList fieldList={table.fields} listName={table.tableName} />
</ul>
<TableRelationsAccessible
table={table}
canvasSchema={canvasSchema}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ export const Field: React.FC<Props> = props => {

const renderChildrenElement = (name: string, children?: FieldVm[]) => {
if (children)
return <FieldList fieldList={children} listName={`${name} nested`} />;
return (
<ul>
<FieldList fieldList={children} listName={`${name} nested`} />
</ul>
);
};

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ interface Props {
export const FieldList: React.FC<Props> = props => {
const { fieldList, listName } = props;

return (
<ul>
{fieldList.map(field => (
<Field field={field} listName={listName} key={field.id} />
))}
</ul>
);
return fieldList.map(field => (
<Field field={field} listName={listName} key={field.id} />
));
};

0 comments on commit b2889e2

Please sign in to comment.