-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LayoutTree: use different hideCaret name in table (#2775)
- Loading branch information
1 parent
e8dbc42
commit b6e7ca2
Showing
2 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import Context from '../@types/Context' | ||
import Path from '../@types/Path' | ||
import State from '../@types/State' | ||
import rootedParentOf from './rootedParentOf' | ||
|
||
/** | ||
* Calls rootedParentOf twice to get the rooted grandparent of a thought. | ||
* A thought's grandparent is relevant when it is column 2 in a table, since its grandparent will be the table itself. | ||
* The only reason why we currently need to know when a thought is in column 2 of a table is in order to apply | ||
* a different indent level to it, since the app will scroll over to it when selected even though indentDepth | ||
* in LayoutTree does not change. | ||
* */ | ||
const rootedGrandparentOf = <T extends Context | Path>(state: State, thoughts: T): T => | ||
rootedParentOf(state, rootedParentOf(state, thoughts)) | ||
|
||
export default rootedGrandparentOf |