Skip to content

Commit

Permalink
reset selected state on table change
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandra Sikora committed May 6, 2020
1 parent b1caba7 commit d83eb9b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useState } from 'react';
import React, { useState, useEffect } from 'react';
import 'react-table/react-table.css';
import '../../../Common/TableCommon/ReactTableOverrides.css';
import DragFoldTable, {
Expand Down Expand Up @@ -86,6 +86,9 @@ const ViewRows = ({
readOnlyMode,
}) => {
const [selectedRows, setSelectedRows] = useState([]);
useEffect(() => {
setSelectedRows([]);
}, [curTableName, currentSchema]);

const NO_PRIMARY_KEY_MSG = 'No primary key to identify row';

Expand Down

0 comments on commit d83eb9b

Please sign in to comment.