aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
diff options
context:
space:
mode:
authoraidahosa1 <aisosa_idahosa@brown.edu>2024-09-17 09:29:33 -0400
committeraidahosa1 <aisosa_idahosa@brown.edu>2024-09-17 09:29:33 -0400
commit1568898125218538a93666cf5d83b9cf01739b49 (patch)
tree0c05f094cec54aeee2286548fc89080336004d90 /src/client/views/collections/CollectionStackingViewFieldColumn.tsx
parent2b4288efa2f21db46addd19c8884f80dba835f2d (diff)
parentc36607691e0b7f5c04f3209a64958f5e51ddd785 (diff)
Merge branch 'master' into aisosa-starter
Diffstat (limited to 'src/client/views/collections/CollectionStackingViewFieldColumn.tsx')
-rw-r--r--src/client/views/collections/CollectionStackingViewFieldColumn.tsx11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
index e2ad5b31d..5ae08e535 100644
--- a/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
+++ b/src/client/views/collections/CollectionStackingViewFieldColumn.tsx
@@ -1,6 +1,3 @@
-/* eslint-disable jsx-a11y/control-has-associated-label */
-/* eslint-disable jsx-a11y/no-static-element-interactions */
-/* eslint-disable jsx-a11y/click-events-have-key-events */
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { action, computed, IReactionDisposer, makeObservable, observable, reaction } from 'mobx';
import { observer } from 'mobx-react';
@@ -51,7 +48,7 @@ interface CSVFieldColumnProps {
addDocument: (doc: Doc | Doc[]) => boolean;
createDropTarget: (ele: HTMLDivElement) => void;
screenToLocalTransform: () => Transform;
- refList: any[];
+ refList: HTMLElement[];
}
@observer
@@ -64,7 +61,7 @@ export class CollectionStackingViewFieldColumn extends ObservableReactComponent<
@observable _heading = '';
@observable _color = '';
- constructor(props: any) {
+ constructor(props: CSVFieldColumnProps) {
super(props);
makeObservable(this);
this._heading = this._props.headingObject ? this._props.headingObject.heading : this._props.heading;
@@ -118,7 +115,7 @@ export class CollectionStackingViewFieldColumn extends ObservableReactComponent<
this._props.pivotField && drop.docs?.forEach(d => Doc.SetInPlace(d, this._props.pivotField, drop.val, false));
return true;
});
- getValue = (value: string): any => {
+ getValue = (value: string) => {
const parsed = parseInt(value);
if (!isNaN(parsed)) return parsed;
if (value.toLowerCase().indexOf('true') > -1) return true;
@@ -212,7 +209,7 @@ export class CollectionStackingViewFieldColumn extends ObservableReactComponent<
<div className="colorOptions">
{colors.map(col => {
const palette = PastelSchemaPalette.get(col);
- return <div className={'colorPicker' + (selected === palette ? ' active' : '')} style={{ backgroundColor: palette }} onClick={() => this.changeColumnColor(palette!)} />;
+ return <div key={col} className={'colorPicker' + (selected === palette ? ' active' : '')} style={{ backgroundColor: palette }} onClick={() => this.changeColumnColor(palette!)} />;
})}
</div>
</div>