@etsoo/materialui 1.1.63 → 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 +2 -2
- package/lib/SearchBar.js +2 -3
- package/package.json +1 -1
- package/src/SearchBar.tsx +4 -5
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,
|
|
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: `${itemMaxWidth}px`,
|
|
233
232
|
visibility: "hidden"
|
|
234
233
|
},
|
|
235
234
|
"& > .hiddenChild": {
|
package/package.json
CHANGED
package/src/SearchBar.tsx
CHANGED
|
@@ -15,9 +15,9 @@ export interface SearchBarProps {
|
|
|
15
15
|
className?: string;
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* Item
|
|
18
|
+
* Item width
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
itemWidth?: number;
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Fields
|
|
@@ -82,7 +82,7 @@ const setChildState = (child: Element, enabled: boolean) => {
|
|
|
82
82
|
*/
|
|
83
83
|
export function SearchBar(props: SearchBarProps) {
|
|
84
84
|
// Destruct
|
|
85
|
-
const { className, fields, onSubmit,
|
|
85
|
+
const { className, fields, onSubmit, itemWidth = 160 } = props;
|
|
86
86
|
|
|
87
87
|
// Labels
|
|
88
88
|
const labels = Labels.CommonPage;
|
|
@@ -314,10 +314,9 @@ export function SearchBar(props: SearchBarProps) {
|
|
|
314
314
|
sx={{
|
|
315
315
|
overflowX: "hidden",
|
|
316
316
|
"& > :not(style)": {
|
|
317
|
-
flexBasis:
|
|
317
|
+
flexBasis: `${itemWidth}px`,
|
|
318
318
|
flexGrow: 0,
|
|
319
319
|
flexShrink: 0,
|
|
320
|
-
maxWidth: `${itemMaxWidth}px`,
|
|
321
320
|
visibility: "hidden"
|
|
322
321
|
},
|
|
323
322
|
"& > .hiddenChild": {
|