cedricdelpoux / cedricdelpoux/react-responsive-masonry

issue with container of item is width:0px

Open
#108 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
455
Forks
47
PR merge metrics
No merged PRs in 30d

Description

display: flex;flex-direction: column;place-content: stretch flex-start;flex: 1 1 0%;/* width: 0px; */gap: 10px;

Removing width 0px; Fixed my issue. had to remove the width to fix this
```

useEffect(()=>{
const data = document.querySelectorAll('div[style="display: flex; flex-direction: column; place-content: stretch flex-start; flex: 1 1 0%; width: 0px; gap: 10px;"');
console.log(data)
if(data){
data.forEach((item)=>{
(item as HTMLElement).setAttribute('style', 'display: flex; flex-direction: column; place-content: stretch flex-start; flex: 1 1 0%; width: 100%; gap: 10px;')
})
}
},[document.querySelectorAll('div[style="display: flex; flex-direction: column; place-content: stretch flex-start; flex: 1 1 0%; width: 0px; gap: 10px;"')])
```

Contributor guide

Open the contributing guide

Research direction

The issue does not name a source file, test, or reproducible example. Start by reproducing the reported zero-width flex container in react-responsive-masonry and inspect the component's flex layout; the work is done when the affected item receives the expected width without the reported DOM-style workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.