Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/react-bootstrap-table2-overlay/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ export default options => loading =>
componentDidMount() {
if (loading) {
const { wrapper } = this.overlay;
const masker = wrapper.firstChild;
const headerDOM = wrapper.parentElement.querySelector('thead');
const bodyDOM = wrapper.parentElement.querySelector('tbody');
const captionDOM = wrapper.parentElement.querySelector('caption');
const masker = wrapper.current.firstChild;
const headerDOM = wrapper.current.parentElement.querySelector('thead');
const bodyDOM = wrapper.current.parentElement.querySelector('tbody');
const captionDOM = wrapper.current.parentElement.querySelector('caption');

let marginTop = window.getComputedStyle(headerDOM).height;
if (captionDOM) {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-bootstrap-table2-overlay/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
}
],
"dependencies": {
"react-loading-overlay": "0.2.8"
"react-loading-overlay": "1.0.1"
},
"peerDependencies": {
"prop-types": "^15.0.0",
Expand Down
468 changes: 310 additions & 158 deletions packages/react-bootstrap-table2-overlay/yarn.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/react-bootstrap-table2-toolkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@
"react-dom": "^16.3.0"
},
"dependencies": {
"file-saver": "1.3.8"
"file-saver": "2.0.2"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ class SearchBar extends React.Component {
id={ `search-bar-${tableId}` }
type="text"
style={ style }
aria-label="enter text you want to search"
onKeyUp={ () => this.onKeyup() }
onChange={ this.onChangeValue }
className={ `form-control ${className}` }
Expand Down
7 changes: 4 additions & 3 deletions packages/react-bootstrap-table2-toolkit/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# yarn lockfile v1


file-saver@1.3.8:
version "1.3.8"
resolved "https://registry.yarnpkg.com/file-saver/-/file-saver-1.3.8.tgz#e68a30c7cb044e2fb362b428469feb291c2e09d8"
file-saver@2.0.2:
version "2.0.2"
resolved "https://registry.yarnpkg.com/file-saver/-/file-saver-2.0.2.tgz#06d6e728a9ea2df2cce2f8d9e84dfcdc338ec17a"
integrity sha512-Wz3c3XQ5xroCxd1G8b7yL0Ehkf0TC9oYC6buPFkNnU9EnaPlifeAFCyCh+iewXTyFRcg0a6j3J7FmJsIhlhBdw==
3 changes: 2 additions & 1 deletion packages/react-bootstrap-table2/src/header-cell.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ const HeaderCell = (props) => {

const cellAttrs = {
..._.isFunction(headerAttrs) ? headerAttrs(column, index) : headerAttrs,
...headerEvents
...headerEvents,
tabIndex: index + 1
};

let sortSymbol;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,10 @@ export default class SelectionCell extends Component {
selected,
onRowSelect,
disabled,
rowIndex,
clickToSelect
rowIndex
} = this.props;

e.stopPropagation();
if (disabled) return;
if (clickToSelect) return;

const checked = inputType === Const.ROW_SELECT_SINGLE
? true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ describe('<SelectionCell />', () => {
/>,
{ bootstrap4: false }
);
wrapper.find('td').simulate('click');
wrapper.find('td').simulate('click', { stopPropagation: jest.fn() });
});

it('should calling handleRowClicked', () => {
Expand All @@ -173,7 +173,7 @@ describe('<SelectionCell />', () => {
/>,
{ bootstrap4: false }
);
wrapper.find('td').simulate('click');
wrapper.find('td').simulate('click', { stopPropagation: jest.fn() });
});

it('should calling handleRowClicked', () => {
Expand Down Expand Up @@ -201,7 +201,7 @@ describe('<SelectionCell />', () => {

it('should be called with correct paramters', () => {
// first click
wrapper.find('td').simulate('click');
wrapper.find('td').simulate('click', { stopPropagation: jest.fn() });
expect(mockOnRowSelect.callCount).toBe(1);
expect(mockOnRowSelect.calledWith(rowKey, true, rowIndex)).toBe(true);
});
Expand All @@ -223,9 +223,9 @@ describe('<SelectionCell />', () => {

it('should be called with correct parameters', () => {
// first click
wrapper.find('td').simulate('click');
wrapper.find('td').simulate('click', { stopPropagation: jest.fn() });
expect(mockOnRowSelect.callCount).toBe(1);
expect(mockOnRowSelect.calledWith(rowKey, false, rowIndex, undefined)).toBe(true);
expect(mockOnRowSelect.calledWith(rowKey, false, rowIndex)).toBe(true);
});
});
});
Expand Down