@etsoo/materialui 1.5.95 → 1.5.96
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/cjs/SearchBar.js +5 -0
- package/lib/mjs/SearchBar.js +5 -0
- package/package.json +1 -1
- package/src/SearchBar.tsx +9 -0
package/lib/cjs/SearchBar.js
CHANGED
|
@@ -152,6 +152,11 @@ function SearchBar(props) {
|
|
|
152
152
|
let newIndex = others;
|
|
153
153
|
for (let c = 0; c < others; c++) {
|
|
154
154
|
const child = children[c];
|
|
155
|
+
// Ignore it when it's input and hidden or display none
|
|
156
|
+
if (child instanceof HTMLInputElement &&
|
|
157
|
+
(child.type === "hidden" || child.offsetParent == null)) {
|
|
158
|
+
continue;
|
|
159
|
+
}
|
|
155
160
|
const cachedWidth = child.getAttribute(cachedWidthName);
|
|
156
161
|
let childWidth;
|
|
157
162
|
if (cachedWidth) {
|
package/lib/mjs/SearchBar.js
CHANGED
|
@@ -146,6 +146,11 @@ export function SearchBar(props) {
|
|
|
146
146
|
let newIndex = others;
|
|
147
147
|
for (let c = 0; c < others; c++) {
|
|
148
148
|
const child = children[c];
|
|
149
|
+
// Ignore it when it's input and hidden or display none
|
|
150
|
+
if (child instanceof HTMLInputElement &&
|
|
151
|
+
(child.type === "hidden" || child.offsetParent == null)) {
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
149
154
|
const cachedWidth = child.getAttribute(cachedWidthName);
|
|
150
155
|
let childWidth;
|
|
151
156
|
if (cachedWidth) {
|
package/package.json
CHANGED
package/src/SearchBar.tsx
CHANGED
|
@@ -233,6 +233,15 @@ export function SearchBar(props: SearchBarProps) {
|
|
|
233
233
|
let newIndex: number = others;
|
|
234
234
|
for (let c: number = 0; c < others; c++) {
|
|
235
235
|
const child = children[c];
|
|
236
|
+
|
|
237
|
+
// Ignore it when it's input and hidden or display none
|
|
238
|
+
if (
|
|
239
|
+
child instanceof HTMLInputElement &&
|
|
240
|
+
(child.type === "hidden" || child.offsetParent == null)
|
|
241
|
+
) {
|
|
242
|
+
continue;
|
|
243
|
+
}
|
|
244
|
+
|
|
236
245
|
const cachedWidth = child.getAttribute(cachedWidthName);
|
|
237
246
|
let childWidth: number;
|
|
238
247
|
if (cachedWidth) {
|