@etsoo/react 1.4.29 → 1.4.30
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.
|
@@ -153,7 +153,8 @@ export function ResponsibleContainer(props) {
|
|
|
153
153
|
? undefined
|
|
154
154
|
: containerBoxSx(showDataGrid) },
|
|
155
155
|
React.createElement(Stack, null,
|
|
156
|
-
React.createElement(Box, { ref: dimensions[0][0], sx: searchBoxSx }, searchBar)
|
|
156
|
+
React.createElement(Box, { ref: dimensions[0][0], sx: searchBoxSx }, searchBar),
|
|
157
|
+
list),
|
|
157
158
|
pullToRefresh && pullContainer && (React.createElement(PullToRefreshUI, { mainElement: pullContainer, triggerElement: pullContainer, instructionsPullToRefresh: labels.pullToRefresh, instructionsReleaseToRefresh: labels.releaseToRefresh, instructionsRefreshing: labels.refreshing, onRefresh: () => { var _a; return (_a = state.ref) === null || _a === void 0 ? void 0 : _a.reset(); }, shouldPullToRefresh: () => {
|
|
158
159
|
const container = document.querySelector(pullContainer);
|
|
159
160
|
return !(container === null || container === void 0 ? void 0 : container.scrollTop);
|
package/lib/mu/SearchBar.js
CHANGED
|
@@ -70,6 +70,7 @@ export function SearchBar(props) {
|
|
|
70
70
|
// Watch container
|
|
71
71
|
const { dimensions } = useDimensions(1, (target, rect) => {
|
|
72
72
|
// Same logic from resetButtonRef
|
|
73
|
+
console.log('useDimensions', state.hasMore, rect.width, lastMaxWidth);
|
|
73
74
|
if (rect.width === lastMaxWidth ||
|
|
74
75
|
(!state.hasMore && rect.width > lastMaxWidth))
|
|
75
76
|
return false;
|
|
@@ -98,6 +99,7 @@ export function SearchBar(props) {
|
|
|
98
99
|
containerRect.width < 10)
|
|
99
100
|
return;
|
|
100
101
|
// Container width
|
|
102
|
+
console.log('resetButtonRef', state.hasMore, containerRect.width, lastMaxWidth);
|
|
101
103
|
let maxWidth = containerRect.width;
|
|
102
104
|
if (maxWidth === lastMaxWidth ||
|
|
103
105
|
(!state.hasMore && maxWidth > lastMaxWidth)) {
|
package/package.json
CHANGED
package/src/mu/SearchBar.tsx
CHANGED
|
@@ -112,6 +112,7 @@ export function SearchBar(props: SearchBarProps) {
|
|
|
112
112
|
// Watch container
|
|
113
113
|
const { dimensions } = useDimensions(1, (target, rect) => {
|
|
114
114
|
// Same logic from resetButtonRef
|
|
115
|
+
console.log('useDimensions', state.hasMore, rect.width, lastMaxWidth);
|
|
115
116
|
if (
|
|
116
117
|
rect.width === lastMaxWidth ||
|
|
117
118
|
(!state.hasMore && rect.width > lastMaxWidth)
|
|
@@ -148,6 +149,12 @@ export function SearchBar(props: SearchBarProps) {
|
|
|
148
149
|
return;
|
|
149
150
|
|
|
150
151
|
// Container width
|
|
152
|
+
console.log(
|
|
153
|
+
'resetButtonRef',
|
|
154
|
+
state.hasMore,
|
|
155
|
+
containerRect.width,
|
|
156
|
+
lastMaxWidth
|
|
157
|
+
);
|
|
151
158
|
let maxWidth = containerRect.width;
|
|
152
159
|
if (
|
|
153
160
|
maxWidth === lastMaxWidth ||
|