@performant-software/semantic-components 1.1.0-beta.2 → 1.1.1-beta.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@performant-software/semantic-components",
3
- "version": "1.1.0-beta.2",
3
+ "version": "1.1.1-beta.0",
4
4
  "description": "A package of shared components based on the Semantic UI Framework.",
5
5
  "license": "MIT",
6
6
  "main": "./build/index.js",
@@ -12,7 +12,7 @@
12
12
  "build": "webpack --mode production && flow-copy-source -v src types"
13
13
  },
14
14
  "dependencies": {
15
- "@performant-software/shared-components": "^1.1.0-beta.2",
15
+ "@performant-software/shared-components": "^1.1.1-beta.0",
16
16
  "@react-google-maps/api": "^2.8.1",
17
17
  "axios": "^0.26.1",
18
18
  "i18next": "^19.4.4",
@@ -43,7 +43,12 @@ type Props = ListProps & {
43
43
  * If a <code>render</code> callback is provided, the item will be passed to the function and the return JSX
44
44
  * will display as the property value.
45
45
  */
46
- columns: Array<Column>
46
+ columns: Array<Column>,
47
+
48
+ /**
49
+ * If <code>true</code>, columns can be shown/hidden by the user.
50
+ */
51
+ configurable?: boolean
47
52
  };
48
53
 
49
54
  type State = {
@@ -139,7 +144,9 @@ const useColumnSelector = (WrappedComponent: ComponentType<any>) => (
139
144
  {...this.props}
140
145
  className={`data-table-column-selector ${this.props.className}`}
141
146
  columns={this.state.columns}
142
- renderListHeader={this.renderHeader.bind(this)}
147
+ renderListHeader={this.props.configurable
148
+ ? this.renderHeader.bind(this)
149
+ : undefined}
143
150
  />
144
151
  );
145
152
  }
@@ -9,11 +9,6 @@ import useDataList, { SORT_ASCENDING, SORT_DESCENDING, type Props as DataListPro
9
9
  import './ListTable.css';
10
10
 
11
11
  type Props = DataListProps & DataTableProps & {
12
- /**
13
- * If true, columns can be shown/hidden by the user.
14
- */
15
- configurable?: boolean,
16
-
17
12
  /**
18
13
  * The name of the default sort column.
19
14
  */
@@ -43,7 +43,12 @@ type Props = ListProps & {
43
43
  * If a <code>render</code> callback is provided, the item will be passed to the function and the return JSX
44
44
  * will display as the property value.
45
45
  */
46
- columns: Array<Column>
46
+ columns: Array<Column>,
47
+
48
+ /**
49
+ * If <code>true</code>, columns can be shown/hidden by the user.
50
+ */
51
+ configurable?: boolean
47
52
  };
48
53
 
49
54
  type State = {
@@ -139,7 +144,9 @@ const useColumnSelector = (WrappedComponent: ComponentType<any>) => (
139
144
  {...this.props}
140
145
  className={`data-table-column-selector ${this.props.className}`}
141
146
  columns={this.state.columns}
142
- renderListHeader={this.renderHeader.bind(this)}
147
+ renderListHeader={this.props.configurable
148
+ ? this.renderHeader.bind(this)
149
+ : undefined}
143
150
  />
144
151
  );
145
152
  }
@@ -9,11 +9,6 @@ import useDataList, { SORT_ASCENDING, SORT_DESCENDING, type Props as DataListPro
9
9
  import './ListTable.css';
10
10
 
11
11
  type Props = DataListProps & DataTableProps & {
12
- /**
13
- * If true, columns can be shown/hidden by the user.
14
- */
15
- configurable?: boolean,
16
-
17
12
  /**
18
13
  * The name of the default sort column.
19
14
  */