@etsoo/materialui 1.1.63 → 1.1.65
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
|
|
@@ -224,12 +224,11 @@ export function SearchBar(props) {
|
|
|
224
224
|
state.form = form;
|
|
225
225
|
} },
|
|
226
226
|
React.createElement(Stack, { ref: dimensions[0][0], justifyContent: "center", alignItems: "center", direction: "row", spacing: 1, width: "100%", sx: {
|
|
227
|
-
overflowX: "hidden",
|
|
228
227
|
"& > :not(style)": {
|
|
229
228
|
flexBasis: "auto",
|
|
230
229
|
flexGrow: 0,
|
|
231
230
|
flexShrink: 0,
|
|
232
|
-
maxWidth: `${
|
|
231
|
+
maxWidth: `${itemWidth}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;
|
|
@@ -312,12 +312,11 @@ export function SearchBar(props: SearchBarProps) {
|
|
|
312
312
|
spacing={1}
|
|
313
313
|
width="100%"
|
|
314
314
|
sx={{
|
|
315
|
-
overflowX: "hidden",
|
|
316
315
|
"& > :not(style)": {
|
|
317
316
|
flexBasis: "auto",
|
|
318
317
|
flexGrow: 0,
|
|
319
318
|
flexShrink: 0,
|
|
320
|
-
maxWidth: `${
|
|
319
|
+
maxWidth: `${itemWidth}px`,
|
|
321
320
|
visibility: "hidden"
|
|
322
321
|
},
|
|
323
322
|
"& > .hiddenChild": {
|