Skip to content

Commit

Permalink
pr requested changes
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Sebastian <[email protected]>
  • Loading branch information
paulstn committed Oct 20, 2023
1 parent 7f24bf5 commit 5793db0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
19 changes: 4 additions & 15 deletions public/components/event_analytics/explorer/sidebar/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,13 @@ export const Sidebar = (props: ISidebarProps) => {
const [showFields, setShowFields] = useState<boolean>(false);
const [searchTerm, setSearchTerm] = useState<string>('');

// list of every single field object
const [allFields, setAllFields] = useState<IField[]>([]);

// method to return the type of a field from its name
const getFieldTypes = (newFieldName: string) => {
let fieldType: string = '';
allFields.map((field) => {
explorerFields.availableFields.map((field) => {
if (field.name === newFieldName) fieldType = field.type;
});
explorerFields.selectedFields.map((field) => {
if (field.name === newFieldName) fieldType = field.type;
});
return fieldType;
Expand Down Expand Up @@ -129,17 +129,6 @@ export const Sidebar = (props: ISidebarProps) => {
[explorerFields, tabId]
);

// this useEffect will set allFields when the page is rendered
useEffect(() => {
if (
explorerFields.availableFields.length > 0 &&
explorerFields.selectedFields.length === 0 &&
allFields.length === 0
) {
setAllFields(explorerFields.availableFields);
}
}, [explorerFields.availableFields]);

const onDragEnd = ({
destination,
source,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,6 @@ export const DataConfigPanelItem = ({
{getNumberField('bucketOffset')}
</>
)}
{/* <EuiSpacer size="m" /> */}
<div className="vbConfig__content">
<EuiFlexItem grow={false}>
<EuiButton
Expand Down

0 comments on commit 5793db0

Please sign in to comment.