Skip to content

[Fix] #78 - 검색 뷰 데이터 바인딩 오류 수정#79

Merged
EunHee-Jeong merged 3 commits intoTeamRecorDream:developfrom
L-j-h-c:feature/#78-searchViewDataBinding
Dec 30, 2022
Merged

[Fix] #78 - 검색 뷰 데이터 바인딩 오류 수정#79
EunHee-Jeong merged 3 commits intoTeamRecorDream:developfrom
L-j-h-c:feature/#78-searchViewDataBinding

Conversation

@L-j-h-c
Copy link
Copy Markdown
Contributor

@L-j-h-c L-j-h-c commented Dec 29, 2022

👻 작업한 내용

검색 뷰 데이터 바인딩 오류 수정

🎤 Fix

1. bindViewModel 호출 시점 수정

-> 기존 .editingChanged 이벤트마다 bindViewModel이 호출 되던 것을 viewDidload 시점에 한번만 되도록 수정했습니다.

2. applySnapshot 메서드 수정

-> 기존에 .non과 .exit 모두 섹션에 추가되었는데, recordCount == 0에 대해 분기처리하여 필요한 섹션만 추가했습니다.

3. CompositionalLayout 수정

-> section.orthogonalScrollingBehavior 을 .none으로 변경하여 기존에 좌우로 스크롤 되던 부분을 세로로 스크롤 되도록 수정했습니다.

4. DreamSearchTextField 내부 operator 수정

-> 아래 부분에서 filter와 distintUntilChanged()를 제거했습니다. filter로 인해 빈 스트링에 대한 검색이 되지 않았고, distinctUntilChanged로 인해 같은 스트링에 대한 연속적인 검색이 불가능했던 문제를 수정했습니다.

self.shouldLoadResult = returnKeyTapped
    .withLatestFrom(self.rx.text) { $1 ?? "" }
    .filter { !$0.isEmpty }
    .distinctUntilChanged()

5. DataSource 내부에서 반복적인 subscribe 수정

-> dataSource가 적용될 때마다 반복적으로 subscribe하던 부분을 수정했습니다.

📮 관련 이슈

@L-j-h-c L-j-h-c added 록시보이 🌽 담당자 fix 버그를 수정합니다. labels Dec 29, 2022
@L-j-h-c L-j-h-c self-assigned this Dec 29, 2022
Copy link
Copy Markdown
Member

@EunHee-Jeong EunHee-Jeong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아자아자 !!!! 감사합니다 👍

@EunHee-Jeong EunHee-Jeong merged commit 71da563 into TeamRecorDream:develop Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix 버그를 수정합니다. 록시보이 🌽 담당자

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fix] 검색뷰 데이터 바인딩 오류 수정

2 participants