@bluemarble/bm-components 0.0.81 → 0.0.83
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.
|
@@ -10,6 +10,7 @@ interface SelectProps extends MuiSelectProps {
|
|
|
10
10
|
withFormik?: boolean;
|
|
11
11
|
FormControlProps?: Partial<FormControlProps>;
|
|
12
12
|
InputLabelProps?: Partial<CustomInputLabelProps>;
|
|
13
|
+
helperText?: string;
|
|
13
14
|
}
|
|
14
15
|
export declare const Select: FC<SelectProps>;
|
|
15
16
|
export declare const BaseSelect: FC<SelectProps>;
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { ColumnsProps } from '../BaseGrid';
|
|
2
2
|
import { FilterProps } from './useFilter';
|
|
3
|
+
interface SearchOptions {
|
|
4
|
+
caseSensitive?: boolean;
|
|
5
|
+
exact?: boolean;
|
|
6
|
+
value: string;
|
|
7
|
+
}
|
|
3
8
|
interface UseGridProps {
|
|
4
9
|
columns: ColumnsProps[];
|
|
5
10
|
filters?: FilterProps[];
|
|
6
11
|
rowsPerPageOptions?: number[];
|
|
12
|
+
search?: SearchOptions;
|
|
7
13
|
}
|
|
8
|
-
export declare function useGrid<T extends Record<string, any>>({ columns, filters, rowsPerPageOptions }: UseGridProps): {
|
|
14
|
+
export declare function useGrid<T extends Record<string, any>>({ columns, filters, search, rowsPerPageOptions }: UseGridProps): {
|
|
9
15
|
data: T[];
|
|
10
16
|
set: (data: T[]) => void;
|
|
11
17
|
onSortBy: (prop: string) => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -99,6 +99,7 @@ interface SelectProps extends SelectProps$1 {
|
|
|
99
99
|
withFormik?: boolean;
|
|
100
100
|
FormControlProps?: Partial<FormControlProps>;
|
|
101
101
|
InputLabelProps?: Partial<CustomInputLabelProps>;
|
|
102
|
+
helperText?: string;
|
|
102
103
|
}
|
|
103
104
|
declare const Select: FC<SelectProps>;
|
|
104
105
|
|
|
@@ -245,12 +246,18 @@ declare function createFilter<T extends Record<string, any>>(filters: FilterProp
|
|
|
245
246
|
apply: (item: T) => boolean;
|
|
246
247
|
};
|
|
247
248
|
|
|
249
|
+
interface SearchOptions {
|
|
250
|
+
caseSensitive?: boolean;
|
|
251
|
+
exact?: boolean;
|
|
252
|
+
value: string;
|
|
253
|
+
}
|
|
248
254
|
interface UseGridProps {
|
|
249
255
|
columns: ColumnsProps[];
|
|
250
256
|
filters?: FilterProps[];
|
|
251
257
|
rowsPerPageOptions?: number[];
|
|
258
|
+
search?: SearchOptions;
|
|
252
259
|
}
|
|
253
|
-
declare function useGrid<T extends Record<string, any>>({ columns, filters, rowsPerPageOptions }: UseGridProps): {
|
|
260
|
+
declare function useGrid<T extends Record<string, any>>({ columns, filters, search, rowsPerPageOptions }: UseGridProps): {
|
|
254
261
|
data: T[];
|
|
255
262
|
set: (data: T[]) => void;
|
|
256
263
|
onSortBy: (prop: string) => void;
|