@jetbrains/ring-ui 6.0.59 → 6.0.61
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import classNames from 'classnames';
|
|
2
|
-
import { Fragment } from 'react';
|
|
3
|
-
import flattenChildren from 'react-keyed-flatten-children';
|
|
2
|
+
import { Children, Fragment } from 'react';
|
|
4
3
|
import styles from './breadcrumbs.css';
|
|
5
4
|
export default function Breadcrumbs({ separatorClassName, children }) {
|
|
6
|
-
return
|
|
5
|
+
return Children.toArray(children).map((child, index) => (
|
|
7
6
|
// eslint-disable-next-line react/no-array-index-key
|
|
8
7
|
<Fragment key={index}>
|
|
9
8
|
{index > 0 && <span className={classNames(styles.separator, separatorClassName)}>{'/'}</span>}
|
|
@@ -113,9 +113,10 @@ export class Table extends PureComponent {
|
|
|
113
113
|
render() {
|
|
114
114
|
const { data, selection, columns, caption, getItemKey, selectable, focused, isItemSelectable, getItemLevel, getItemClassName, getMetaColumnClassName, getItemDataTest, draggable, alwaysShowDragHandle, dragHandleTitle, loading, onSort, sortKey, sortOrder, loaderClassName, stickyHeader, stickyHeaderOffset, isItemCollapsible, isParentCollapsible, isItemCollapsed, onItemCollapse, onItemExpand, isDisabledSelectionVisible, getCheckboxTooltip, onItemDoubleClick, onItemClick, renderEmpty, maxColSpan, RowComponent } = this.props;
|
|
115
115
|
// NOTE: Do not construct new object per render because it causes all rows rerendering
|
|
116
|
+
const columnsArray = typeof columns === 'function' ? columns(null) : columns;
|
|
116
117
|
const headerProps = {
|
|
117
118
|
caption, selectable, draggable,
|
|
118
|
-
columns:
|
|
119
|
+
columns: columnsArray, onSort, sortKey, sortOrder,
|
|
119
120
|
sticky: stickyHeader,
|
|
120
121
|
topStickOffset: stickyHeaderOffset, maxColSpan: this.props.maxColSpan
|
|
121
122
|
};
|
|
@@ -137,7 +138,7 @@ export class Table extends PureComponent {
|
|
|
137
138
|
});
|
|
138
139
|
const renderList = ({ children, props }) => {
|
|
139
140
|
const empty = (<tr>
|
|
140
|
-
<td colSpan={
|
|
141
|
+
<td colSpan={columnsArray.length || 1} className={style.tableMessage}>
|
|
141
142
|
{renderEmpty ? renderEmpty() : null}
|
|
142
143
|
</td>
|
|
143
144
|
</tr>);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.61",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": "JetBrains",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -234,7 +234,6 @@
|
|
|
234
234
|
"postcss-modules-values-replace": "^4.2.0",
|
|
235
235
|
"postcss-preset-env": "^9.6.0",
|
|
236
236
|
"prop-types": "^15.8.1",
|
|
237
|
-
"react-keyed-flatten-children": "^3.0.2",
|
|
238
237
|
"react-movable": "^3.3.1",
|
|
239
238
|
"react-virtualized": "^9.22.5",
|
|
240
239
|
"react-waypoint": "^10.3.0",
|