@axinom/mosaic-ui 0.50.0-rc.9 → 0.51.0-rc.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": "@axinom/mosaic-ui",
3
- "version": "0.50.0-rc.9",
3
+ "version": "0.51.0-rc.0",
4
4
  "description": "UI components for building Axinom Mosaic applications",
5
5
  "author": "Axinom",
6
6
  "license": "PROPRIETARY",
@@ -32,7 +32,7 @@
32
32
  "build-storybook": "storybook build"
33
33
  },
34
34
  "dependencies": {
35
- "@axinom/mosaic-core": "^0.4.23-rc.9",
35
+ "@axinom/mosaic-core": "^0.4.24-rc.0",
36
36
  "@faker-js/faker": "^7.4.0",
37
37
  "@popperjs/core": "^2.11.8",
38
38
  "clsx": "^1.1.0",
@@ -105,5 +105,5 @@
105
105
  "publishConfig": {
106
106
  "access": "public"
107
107
  },
108
- "gitHead": "a64f5fd124ebef899b73d42f2a38d7db008369bf"
108
+ "gitHead": "a99c608834292804eb1d93b7bbcea6624e55c6a0"
109
109
  }
@@ -44,6 +44,7 @@ describe('FreeTextFilter', () => {
44
44
  });
45
45
 
46
46
  it('selects text on focus when selectOnFocus is true and there is a value', () => {
47
+ jest.useFakeTimers();
47
48
  const mockValue = 'test value';
48
49
  const spy = jest.fn();
49
50
 
@@ -53,6 +54,9 @@ describe('FreeTextFilter', () => {
53
54
  const input = wrapper.find('input');
54
55
  input.simulate('focus');
55
56
 
57
+ // Fast-forward until all timers have been executed
58
+ jest.runAllTimers();
59
+
56
60
  const inputElement = input.getDOMNode<HTMLInputElement>();
57
61
  expect(inputElement.selectionStart).toBe(0);
58
62
  expect(inputElement.selectionEnd).toBe(mockValue.length);
@@ -37,7 +37,10 @@ export const FreeTextFilter: React.FC<FreeTextFilterProps> = ({
37
37
 
38
38
  const onFocusWrapper = (): void => {
39
39
  if (selectOnFocus && valueLocal) {
40
- inputRef.current?.select();
40
+ // setTimeout ensures inputRef.current is available before selecting, as it may be null if the user hits enter and refocuses.
41
+ setTimeout(() => {
42
+ inputRef.current?.select();
43
+ });
41
44
  }
42
45
  };
43
46
 
@@ -177,7 +177,7 @@ export const ListRow = <T extends Data>({
177
177
  horizontalTextAlign = 'left',
178
178
  verticalTextAlign = 'center',
179
179
  textWrap = false,
180
- rowHeight = textWrap ? undefined : '50px',
180
+ rowHeight = textWrap ? 'auto' : '50px',
181
181
  data,
182
182
  itemSelected = false,
183
183
  isTrigger = false,