Skip to content

Commit

Permalink
... fix them again?
Browse files Browse the repository at this point in the history
  • Loading branch information
bsholmes committed Sep 18, 2023
1 parent e4db833 commit d95b895
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/components/Table/utils/RowState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@ export class RowState<R extends Kinded> {
removed: false | "soft" | "hard" = false;
private isCalculatingDirectMatch = false;

constructor(private states: RowStates<R>, public parent: RowState<R> | undefined, row: GridDataRow<R>) {
constructor(
private states: RowStates<R>,
public parent: RowState<R> | undefined,
row: GridDataRow<R>,
) {
this.row = row;
this.selected = !!row.initSelected;
this.collapsed = states.storage.wasCollapsed(row.id) ?? !!row.initCollapsed;
Expand Down
2 changes: 1 addition & 1 deletion src/components/internal/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function Menu<T>(props: PropsWithChildren<MenuProps<T>>) {
// by React-Aria to keep track of item states such as focus, and provide hooks for calling those actions.
const tree = useTreeData({
initialItems: [items, persistentItems ? persistentItems : []].map(
(i, idx) => ({ label: idx === 0 ? "items" : "persistent", items: i } as MenuSection),
(i, idx) => ({ label: idx === 0 ? "items" : "persistent", items: i }) as MenuSection,
),
getKey: (item) => camelCase(item.label),
getChildren: (item) => (item as MenuSection).items ?? [],
Expand Down
2 changes: 1 addition & 1 deletion src/inputs/TreeSelectField/TreeSelectField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ interface CollapsedChildrenState<O, V extends Value> {
export const CollapsedContext = React.createContext<CollapsedChildrenState<any, any>>({
collapsedKeys: [],
setCollapsedKeys: () => {},
getOptionValue: () => ({} as any),
getOptionValue: () => ({}) as any,
});

function TreeSelectFieldBase<O, V extends Value>(props: TreeSelectFieldProps<O, V>) {
Expand Down

0 comments on commit d95b895

Please sign in to comment.