Skip to content

Commit

Permalink
feat: Removed logs
Browse files Browse the repository at this point in the history
  • Loading branch information
tbalar-splunk committed Mar 10, 2021
1 parent 3ce2363 commit 6763ef9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState, useContext } from 'react';
import React, { useState } from 'react';
import Table from '@splunk/react-ui/Table';
import Switch from '@splunk/react-ui/Switch';
import ButtonGroup from '@splunk/react-ui/ButtonGroup';
Expand All @@ -12,16 +12,12 @@ import PropTypes from 'prop-types';
import { ActionButtonComponent } from './TableStyle';
import { getUnifiedConfigs } from '../../util/util';
import { getExpansionRow } from './TableExpansionRow';
import InputRowContext from '../../context/InputRowContext';

function InputTable({ isInput, serviceName, data, handleToggleActionClick }) {

const [sortKey, setSortKey] = useState('name');
const [sortDir, setSortDir] = useState('asc');

const { rowData, setRowData } = useContext(InputRowContext);
console.log("rowData: ", rowData);

const generateColumns = () => {
const unifiedConfigs = getUnifiedConfigs();
let column = [];
Expand Down Expand Up @@ -121,14 +117,14 @@ function InputTable({ isInput, serviceName, data, handleToggleActionClick }) {
key={row.id}
expansionRow={getExpansionRow(columns.length, row)}
>
{columns && columns.length && columns.map((header, index) => {
{columns && columns.length && columns.map((header) => {
if (header.field === "disabled") {
return (
<Table.Cell key={header.field}>
<Switch
key={row.name}
value={row.disabled}
onClick={() => handleToggleActionClick(row, index)}
onClick={() => handleToggleActionClick(row)}
selected={!row.disabled}
appearance="toggle"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ function TableWrapper({ isInput, serviceName }) {
*
* @param row {Object} row
*/
const changeStatus = (row, index) => {
const changeStatus = (row) => {

}

Expand Down Expand Up @@ -686,7 +686,7 @@ function TableWrapper({ isInput, serviceName }) {
isInput={isInput}
serviceName={serviceName}
data={filteredData}
handleToggleActionClick={(row, index) => changeStatus(row, index)}
handleToggleActionClick={(row) => changeStatus(row)}
/>
</>
}
Expand Down

0 comments on commit 6763ef9

Please sign in to comment.