bkhpanigha / hh-suttas

HH Suttas (Development)
https://hh-suttas.onrender.com/
9 stars 7 forks source link

2. Bug foreword not showing #95

Closed ghost closed 6 months ago

Reptilioo commented 6 months ago

@ishaanv I believe the commit 4e6a7a4 could revert back the issue of PR #79 where during a search the list of suttas will not be replaced by the search results but rather the search results would be appended at the end of the suttas list.

Edit: We will have to find out how to append the suttas list to the forewords when displaying the suttas for the first time and how to replace the current list by the search results when doing a search

Edit2: we could use displaySuttas()'s isSearch parameter to distinguish between the two, something like that, line 84~85:

if isSearch
   suttaArea.innerHTML = ""
ghost commented 6 months ago

@ishaanv I believe the commit 4e6a7a4 could revert back the issue of PR #79 where during a search the list of suttas will not be replaced by the search results but rather the search results would be appended at the end of the suttas list.

Edit: We will have to find out how to append the suttas list to the forewords when displaying the suttas for the first time and how to replace the current list by the search results when doing a search

Edit2: we could use displaySuttas()'s isSearch parameter to distinguish between the two, something like that, line 84~85:

if isSearch suttaArea.innerHTML = ""

I see. Your suggestion could be an option. But perhaps we can simplify the logic even further. Let me look into it.