@etsoo/materialui 1.1.62 → 1.1.64
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/lib/SearchBar.d.ts +4 -0
- package/lib/SearchBar.js +2 -3
- package/package.json +1 -1
- package/src/SearchBar.tsx +7 -3
package/lib/SearchBar.d.ts
CHANGED
package/lib/SearchBar.js
CHANGED
|
@@ -52,7 +52,7 @@ const setChildState = (child, enabled) => {
|
|
|
52
52
|
*/
|
|
53
53
|
export function SearchBar(props) {
|
|
54
54
|
// Destruct
|
|
55
|
-
const { className, fields, onSubmit } = props;
|
|
55
|
+
const { className, fields, onSubmit, itemWidth = 160 } = props;
|
|
56
56
|
// Labels
|
|
57
57
|
const labels = Labels.CommonPage;
|
|
58
58
|
// Spacing
|
|
@@ -226,10 +226,9 @@ export function SearchBar(props) {
|
|
|
226
226
|
React.createElement(Stack, { ref: dimensions[0][0], justifyContent: "center", alignItems: "center", direction: "row", spacing: 1, width: "100%", sx: {
|
|
227
227
|
overflowX: "hidden",
|
|
228
228
|
"& > :not(style)": {
|
|
229
|
-
flexBasis:
|
|
229
|
+
flexBasis: `${itemWidth}px`,
|
|
230
230
|
flexGrow: 0,
|
|
231
231
|
flexShrink: 0,
|
|
232
|
-
maxWidth: "180px",
|
|
233
232
|
visibility: "hidden"
|
|
234
233
|
},
|
|
235
234
|
"& > .hiddenChild": {
|
package/package.json
CHANGED
package/src/SearchBar.tsx
CHANGED
|
@@ -14,6 +14,11 @@ export interface SearchBarProps {
|
|
|
14
14
|
*/
|
|
15
15
|
className?: string;
|
|
16
16
|
|
|
17
|
+
/**
|
|
18
|
+
* Item width
|
|
19
|
+
*/
|
|
20
|
+
itemWidth?: number;
|
|
21
|
+
|
|
17
22
|
/**
|
|
18
23
|
* Fields
|
|
19
24
|
*/
|
|
@@ -77,7 +82,7 @@ const setChildState = (child: Element, enabled: boolean) => {
|
|
|
77
82
|
*/
|
|
78
83
|
export function SearchBar(props: SearchBarProps) {
|
|
79
84
|
// Destruct
|
|
80
|
-
const { className, fields, onSubmit } = props;
|
|
85
|
+
const { className, fields, onSubmit, itemWidth = 160 } = props;
|
|
81
86
|
|
|
82
87
|
// Labels
|
|
83
88
|
const labels = Labels.CommonPage;
|
|
@@ -309,10 +314,9 @@ export function SearchBar(props: SearchBarProps) {
|
|
|
309
314
|
sx={{
|
|
310
315
|
overflowX: "hidden",
|
|
311
316
|
"& > :not(style)": {
|
|
312
|
-
flexBasis:
|
|
317
|
+
flexBasis: `${itemWidth}px`,
|
|
313
318
|
flexGrow: 0,
|
|
314
319
|
flexShrink: 0,
|
|
315
|
-
maxWidth: "180px",
|
|
316
320
|
visibility: "hidden"
|
|
317
321
|
},
|
|
318
322
|
"& > .hiddenChild": {
|