Comments (4)
Please provide some codes to show your usecase, I'm hardly understand your problem.
from rxjs-hooks.
useEffect(() => {
const virtualListEle: HTMLDivElement = listContainerRef.current
containerHeight$.next(virtualListEle.clientHeight)
const actualRow$ = combineLatest(containerHeight$, props.options$).pipe(
map(([ch, { height }]) => Math.ceil(ch / height)),
)
const dataInViewSlice$ = combineLatest(props.data$, actualRow$).pipe(
map(([data, actualRows]) => data.slice(0, actualRows)),
)
const scrollHeight$ = combineLatest(props.data$, props.options$).pipe(
map(([data, { height }]) => data.length * height),
)
sub.add(
combineLatest(dataInViewSlice$, scrollHeight$).subscribe(
([data, height]) => {
setData(data)
seHeight(height)
},
),
)
return () => {
sub.unsubscribe()
}
}, [listContainerRef.current])
from rxjs-hooks.
It seems that rxjs-hooks isn't suitable for this case. So you may have to do the thing in your own style.
from rxjs-hooks.
ok tks
from rxjs-hooks.
Related Issues (20)
- useEventCallback is not working with react 18 HOT 3
- Shows "difficulty.easy" in SQL section instead of Easy,Medium and Hard
- 为什么我写了依赖,但是不管用呢,界面并不会更新啊 HOT 2
- Feature request: add support for error handling and tap option HOT 1
- `useObservable` state generic is incorrectly inferred HOT 1
- Question about useEventCallback. HOT 1
- Passing custom values into `useEventCallback` callback HOT 1
- Feature request: useObservable to return the instant value on Component initialize if Observable has sync value HOT 1
- This project is alive? HOT 4
- An in-range update of @types/lodash is breaking the build 🚨 HOT 7
- An in-range update of husky is breaking the build 🚨 HOT 5
- An in-range update of sinon is breaking the build 🚨 HOT 2
- An in-range update of webpack-cli is breaking the build 🚨 HOT 2
- An in-range update of ts-jest is breaking the build 🚨 HOT 1
- useEventCallback stop working with RJXS.ajax HOT 2
- An in-range update of tslint-react is breaking the build 🚨 HOT 1
- Bug: Emit same object will not trigger re-render HOT 3
- Respond to prop changes with side effect HOT 2
- Suggestion: use object for `input` instead of tuple HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rxjs-hooks.