From f23ea0cbde3c4193b8039f317fe71d965c8cbf40 Mon Sep 17 00:00:00 2001
From: geireann <geireann.lindfield@gmail.com>
Date: Wed, 10 Jul 2024 12:00:47 -0400
Subject: some lint fixes and updating packages.

---
 src/client/views/collections/CollectionMenu.tsx | 23 ++++++++---------------
 1 file changed, 8 insertions(+), 15 deletions(-)

(limited to 'src/client/views/collections/CollectionMenu.tsx')

diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx
index 3eb3008c4..b2f0280a5 100644
--- a/src/client/views/collections/CollectionMenu.tsx
+++ b/src/client/views/collections/CollectionMenu.tsx
@@ -17,7 +17,7 @@ import { DocData } from '../../../fields/DocSymbols';
 import { List } from '../../../fields/List';
 import { ObjectField } from '../../../fields/ObjectField';
 import { RichTextField } from '../../../fields/RichTextField';
-import { BoolCast, Cast, DocCast, NumCast, StrCast } from '../../../fields/Types';
+import { BoolCast, Cast, NumCast, StrCast } from '../../../fields/Types';
 import { CollectionViewType, DocumentType } from '../../documents/DocumentTypes';
 import { DragManager } from '../../util/DragManager';
 import { dropActionType } from '../../util/DropActionTypes';
@@ -47,7 +47,7 @@ export class CollectionMenu extends AntimodeMenu<CollectionMenuProps> {
 
     private _docBtnRef = React.createRef<HTMLDivElement>();
 
-    constructor(props: any) {
+    constructor(props: CollectionMenuProps) {
         super(props);
         makeObservable(this);
         CollectionMenu.Instance = this;
@@ -279,8 +279,8 @@ export class CollectionViewBaseChrome extends React.Component<CollectionViewMenu
         initialize: (button: Doc) => {
             const activeDash = Doc.ActiveDashboard;
             if (activeDash) {
-                button.target_childFilters = (Doc.MySearcher._childFilters || activeDash._childFilters) instanceof ObjectField ? ObjectField.MakeCopy((Doc.MySearcher._childFilters || activeDash._childFilters) as any as ObjectField) : undefined;
-                button.target_searchFilterDocs = activeDash._searchFilterDocs instanceof ObjectField ? ObjectField.MakeCopy(activeDash._searchFilterDocs as any as ObjectField) : undefined;
+                button.target_childFilters = (Doc.MySearcher._childFilters || activeDash._childFilters) instanceof ObjectField ? ObjectField.MakeCopy((Doc.MySearcher._childFilters || activeDash._childFilters) as ObjectField) : undefined;
+                button.target_searchFilterDocs = activeDash._searchFilterDocs instanceof ObjectField ? ObjectField.MakeCopy(activeDash._searchFilterDocs) : undefined;
             }
         },
     };
@@ -338,15 +338,9 @@ export class CollectionViewBaseChrome extends React.Component<CollectionViewMenu
         this._currentKey = this._currentKey || (this._buttonizableCommands?.length ? this._buttonizableCommands[0]?.title : '');
     });
 
-    @undoBatch
-    viewChanged = (e: React.ChangeEvent) => {
-        const target = this.document !== Doc.MyLeftSidebarPanel ? this.document : DocCast(this.document.proto);
-        target._type_collection = (e.target as any).selectedOptions[0].value;
-    };
-
-    commandChanged = (e: React.ChangeEvent) => {
+    commandChanged = (e: React.ChangeEvent<HTMLSelectElement>) => {
         runInAction(() => {
-            this._currentKey = (e.target as any).selectedOptions[0].value;
+            this._currentKey = e.target.selectedOptions[0].value;
         });
     };
 
@@ -485,7 +479,7 @@ export class CollectionNoteTakingViewChrome extends React.Component<CollectionVi
     };
 
     @action
-    onKeyChange = (e: React.ChangeEvent, { newValue }: { newValue: string }) => {
+    onKeyChange = (e: React.FormEvent<Element>, { newValue }: { newValue: string }) => {
         this._currentKey = newValue;
     };
 
@@ -538,7 +532,6 @@ export class CollectionNoteTakingViewChrome extends React.Component<CollectionVi
                                 autosuggestProps: {
                                     inputProps: {
                                         value: this._currentKey,
-                                        // @ts-ignore
                                         onChange: this.onKeyChange,
                                     },
                                     getSuggestionValue: this.getSuggestionValue,
@@ -733,7 +726,7 @@ export class CollectionGridViewChrome extends React.Component<CollectionViewMenu
                     onChange={this.changeCompactType}
                     value={StrCast(this.document.gridStartCompaction, StrCast(this.document.gridCompaction))}>
                     {['vertical', 'horizontal', 'none'].map(type => (
-                        <option className="collectionGridViewChrome-viewOption" onPointerDown={stopPropagation} value={type}>
+                        <option key={type} className="collectionGridViewChrome-viewOption" onPointerDown={stopPropagation} value={type}>
                             {this.resize ? type[0].toUpperCase() + type.substring(1) : 'Compact: ' + type}
                         </option>
                     ))}
-- 
cgit v1.2.3-70-g09d2

