dreamRs / dreamRs/shinytreeview
searchTreeview behaves strangely
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 42
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
According to the sample code, after adding this search function on the server side.
By default, all levels will be expanded and all countries will meet the conditions.
searchTreeview(
inputId = "country",
pattern = input$search,
reveal_results = TRUE
)
I think it is the pattern field.
When no search value is entered, the passed pattern is "", and the code will think that this "" can be matched by any string.
I have tried to set it to NA or NULL, but the performance is abnormal.
Setting it to NA is the same as setting it to ""
Setting it to NULL, although it meets expectations in the default state. However, once a search is performed, the performance status will not be refreshed after resetting to NULL.
How to deal with this?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the sample searchTreeview call with input$search set to an empty string, NA, and NULL. Trace how clearing the search value affects expansion and filtering after a prior search. Done means the default tree state and the reset-after-search state both match the documented behavior; the issue names no source file or test to run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100