Skip to content

Commit 6e483be

Browse files
authored
Merge pull request #490 from layer5io/489-remove-packages-path
fix: remove packages path, and move to src directory
2 parents dfee50e + 107e6fb commit 6e483be

File tree

26 files changed

+115
-115
lines changed

26 files changed

+115
-115
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@layer5/sistent",
3-
"version": "0.14.6",
3+
"version": "0.14.7",
44
"description": "Reusable React Components and SVG Icons library",
55
"repository": {
66
"type": "git",

packages/components/src/utils/typing.utils.ts

Lines changed: 0 additions & 97 deletions
This file was deleted.

packages/components/src/custom/TypingFilter/TypingFIlterInput.tsx renamed to src/custom/TypingFilter/TypingFIlterInput.tsx

File renamed without changes.
File renamed without changes.

packages/components/src/custom/TypingFilter/TypingFilterSuggestions.tsx renamed to src/custom/TypingFilter/TypingFilterSuggestions.tsx

File renamed without changes.

packages/components/src/custom/TypingFilter/index.tsx renamed to src/custom/TypingFilter/index.tsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import {
1010
FilteringState,
1111
filterReducer
1212
} from '../../utils/typing.state';
13+
import { getFilters } from '../../utils/typing.utils';
1314
import TypingFilterInput from './TypingFIlterInput';
1415
import { TypingFilters } from './TypingFIlters';
1516
import { TypingFilterValueSuggestions } from './TypingFilterSuggestions';
16-
import { getFilters } from '../../utils/typing.utils';
1717

1818
interface TypingFilterType {
1919
filterSchema: FilterSchema;
@@ -79,29 +79,31 @@ export function TypingFilter({ filterSchema, handleFilter, autoFilter = false }:
7979
return;
8080
}
8181

82+
const inputField = inputFieldRef.current; // Copy the value to a variable
83+
8284
const handleKeyDown = (e: KeyboardEvent) => {
8385
if (e.key === 'Enter') {
84-
// Perform nullish check before accessing inputFieldRef.current.value
85-
const inputValue = inputFieldRef.current?.value ?? '';
86+
// Perform nullish check before accessing inputField.value
87+
const inputValue = inputField?.value ?? '';
8688
handleFilter(getFilters(inputValue, filterSchema));
8789
setAnchorEl(null);
8890
}
8991
};
9092

91-
inputFieldRef.current?.addEventListener('keydown', handleKeyDown);
93+
inputField?.addEventListener('keydown', handleKeyDown);
9294

9395
return () => {
94-
inputFieldRef.current?.removeEventListener('keydown', handleKeyDown);
96+
inputField?.removeEventListener('keydown', handleKeyDown);
9597
};
96-
}, []);
98+
}, [filterSchema, handleFilter]);
9799

98100
React.useEffect(() => {
99101
if (autoFilter && filterState.state === FilteringState.SELECTING_FILTER) {
100102
// Perform nullish check before accessing filterState.context
101103
const filterValue = filterState.context?.value ?? '';
102104
handleFilter(getFilters(filterValue, filterSchema));
103105
}
104-
}, [filterState.state]);
106+
}, [filterState.state, autoFilter, filterSchema, filterState.context?.value, handleFilter]);
105107

106108
return (
107109
<React.Fragment>

src/custom/readme.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,9 @@ This custom React component, `ResponsiveDataTable`, is a wrapper around the Mate
3535

3636
### Standard Props
3737

38-
| Property | Type | Description |
39-
| -------- | -------- | ----------------------------------------------------------------------------------------------------------- |
40-
| `rowsPerPageOptions` | `number[]` | (Optional) Array of numbers representing the number of rows per page. If not provided, the default values will be used(20, 50, 100). |
41-
38+
| Property | Type | Description |
39+
| -------------------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------ |
40+
| `rowsPerPageOptions` | `number[]` | (Optional) Array of numbers representing the number of rows per page. If not provided, the default values will be used(20, 50, 100). |
4241

4342
### Customization
4443

src/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ export * from './base';
22
export * from './colors';
33
export * from './custom';
44
export * from './icons';
5+
export * from './schemas';
56
export * from './theme';

packages/components/src/schemas/createAndEditEnvironment/schema.tsx renamed to src/schemas/createAndEditEnvironment/schema.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,16 @@ const createAndEditEnvironmentSchema = {
99
'x-rjsf-grid-area': '12'
1010
},
1111
name: {
12-
description: "Enter a unique and meaningful name for the environment. Remember you can change name of environment after it's creation too",
12+
description:
13+
"Enter a unique and meaningful name for the environment. Remember you can change name of environment after it's creation too",
1314
title: 'Name',
1415
type: 'string',
1516
'x-rjsf-grid-area': '12'
1617
},
1718
organization: {
1819
type: 'string',
1920
title: 'Organization',
20-
description: "Select a organization in whic",
21+
description: 'Select a organization in whic',
2122
enum: [],
2223
enumNames: [],
2324
'x-rjsf-grid-area': '12'

0 commit comments

Comments
 (0)