NotionX / NotionX/react-notion-x
Open search dialog from external
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.4k
- Forks
- 645
- PR merge metrics
- No merged PRs in 30d
Description
Feature Request: Change search state externally
I suggest a feature that externally changable searchOpen state
I guess, this file is implementing searhOpen state like this
const [isSearchOpen, setIsSearchOpen] = React.useState(false)
const onOpenSearch = React.useCallback(() => {
setIsSearchOpen(true)
}, [])
const onCloseSearch = React.useCallback(() => {
setIsSearchOpen(false)
}, [])
I'm not sure how to make this feature as code, but I suggest some applicable functions by this feature
example functions
ctrl + pshortcut for activate search dialog like notion.so- Auto open search dialog modal when open landing page (what I want to do)
Thanks for this great project
Contributor guide
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 with packages/react-notion-x/src/components/page-header.tsx, where the issue identifies the internal searchOpen state and handlers. Read the surrounding page-header usage to determine how search is exposed and what external callers can access. Done should provide a defined way to open the search dialog from outside the component, with the supported external trigger made clear.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100