@teselagen/ui 0.10.3 → 0.10.5

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": "@teselagen/ui",
3
- "version": "0.10.3",
3
+ "version": "0.10.5",
4
4
  "main": "./src/index.js",
5
5
  "type": "module",
6
6
  "exports": {
@@ -171,7 +171,7 @@ const RenderColumnHeader = ({
171
171
  })}
172
172
  onContextMenu={e => {
173
173
  if (!withDisplayOptions) {
174
- return
174
+ return;
175
175
  }
176
176
  e.preventDefault();
177
177
  e.persist();
@@ -176,10 +176,12 @@ const DisplayOptions = ({
176
176
  }}
177
177
  >
178
178
  Displayed Columns:  
179
- {doNotSearchHiddenColumns && <InfoHelper>
180
- Note: Hidden columns will NOT be used when searching the
181
- datatable
182
- </InfoHelper>}
179
+ {doNotSearchHiddenColumns && (
180
+ <InfoHelper>
181
+ Note: Hidden columns will NOT be used when searching the
182
+ datatable
183
+ </InfoHelper>
184
+ )}
183
185
  </h5>
184
186
  <div style={{ maxHeight: 260, overflowY: "auto", padding: 2 }}>
185
187
  {mainFields.map(getFieldCheckbox)}
@@ -563,6 +563,7 @@ const DataTable = ({
563
563
  }, [
564
564
  convertedSchema, // If the schema changes we want to take into account the synced tableConfig again
565
565
  formName,
566
+ setTableConfig,
566
567
  syncDisplayOptionsToDb,
567
568
  tableConfigurations,
568
569
  withDisplayOptions,
@@ -2824,6 +2825,7 @@ const DataTable = ({
2824
2825
  noVirtual={noVirtual}
2825
2826
  className={classNames({
2826
2827
  isCellEditable,
2828
+ "loading": isLoading,
2827
2829
  "tg-table-loading": isLoading,
2828
2830
  "tg-table-disabled": disabled
2829
2831
  })}
@@ -253,7 +253,11 @@ body:not(.drag-active)
253
253
  user-select: none;
254
254
  background: #f7f7f7;
255
255
  }
256
-
256
+ /* disable the table header interactions while the table is loading */
257
+ .ReactTable.loading .rt-thead {
258
+ opacity: 0.7;
259
+ pointer-events: none;
260
+ }
257
261
  .ReactTable .rt-thead {
258
262
  box-shadow: none;
259
263
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
@@ -421,10 +425,6 @@ body:not(.drag-active)
421
425
  padding-left: 2px;
422
426
  }
423
427
 
424
- .ReactTable .-loading.disabled {
425
- cursor: not-allowed;
426
- }
427
-
428
428
  /* to get the height to resize based on its container: */
429
429
  .ReactTable {
430
430
  height: 100%;
@@ -540,14 +540,6 @@ body:not(.drag-active)
540
540
  color: inherit !important;
541
541
  }
542
542
 
543
- .bp3-dark .ReactTable .-loading {
544
- background: #30404d !important;
545
- }
546
-
547
- .bp3-dark .ReactTable .-loading > div {
548
- color: #f5f8fa !important;
549
- }
550
-
551
543
  .bp3-dark .ReactTable .rt-tr-group.selected {
552
544
  background: #26738cb0 !important;
553
545
  }
@@ -27,7 +27,13 @@ export function tableQueryParamsToHasuraClauses({
27
27
  const { type, path, searchDisabled, isHidden } = field;
28
28
  if (uniqueFieldsByPath[path]) return; // Skip if already added
29
29
  uniqueFieldsByPath[path] = true;
30
- if (searchDisabled || field.filterDisabled || type === "color" || isHidden) return;
30
+ if (
31
+ searchDisabled ||
32
+ field.filterDisabled ||
33
+ type === "color" ||
34
+ isHidden
35
+ )
36
+ return;
31
37
 
32
38
  // Process each search term
33
39
  searchTerms.forEach(term => {
@@ -429,6 +429,7 @@ class TgSelect extends React.Component {
429
429
  }
430
430
  },
431
431
  inputProps: {
432
+ name: "tg-multiselect-input",
432
433
  autoFocus: autoFocus || autoOpen,
433
434
  onBlur,
434
435
  ...(tagInputProps && tagInputProps.inputProps)
package/ui.css CHANGED
@@ -9721,7 +9721,11 @@ body:not(.drag-active)
9721
9721
  user-select: none;
9722
9722
  background: #f7f7f7;
9723
9723
  }
9724
-
9724
+ /* disable the table header interactions while the table is loading */
9725
+ .ReactTable.loading .rt-thead {
9726
+ opacity: 0.7;
9727
+ pointer-events: none;
9728
+ }
9725
9729
  .ReactTable .rt-thead {
9726
9730
  box-shadow: none;
9727
9731
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
@@ -9889,10 +9893,6 @@ body:not(.drag-active)
9889
9893
  padding-left: 2px;
9890
9894
  }
9891
9895
 
9892
- .ReactTable .-loading.disabled {
9893
- cursor: not-allowed;
9894
- }
9895
-
9896
9896
  /* to get the height to resize based on its container: */
9897
9897
  .ReactTable {
9898
9898
  height: 100%;
@@ -10008,14 +10008,6 @@ body:not(.drag-active)
10008
10008
  color: inherit !important;
10009
10009
  }
10010
10010
 
10011
- .bp3-dark .ReactTable .-loading {
10012
- background: #30404d !important;
10013
- }
10014
-
10015
- .bp3-dark .ReactTable .-loading > div {
10016
- color: #f5f8fa !important;
10017
- }
10018
-
10019
10011
  .bp3-dark .ReactTable .rt-tr-group.selected {
10020
10012
  background: #26738cb0 !important;
10021
10013
  }