MCPcopy Create free account
hub / github.com/SplootCode/splootcode / constructor

Method constructor

packages/editor/src/components/insert_box.tsx:154–169  ·  view source on GitHub ↗
(props: InsertBoxProps)

Source from the content-addressed store, hash-verified

152 private suggestionsRef: React.RefObject<HTMLUListElement>
153
154 constructor(props: InsertBoxProps) {
155 super(props)
156 this.inputRef = React.createRef()
157 this.suggestionsRef = React.createRef()
158
159 this.state = {
160 userInput: '',
161 autoWidth: this.getWidth(''),
162 cursorPosition: null,
163 filteredSuggestions: [],
164 autocompleters: [],
165 staticSuggestions: [],
166 staticSuggestionKeys: new Set(),
167 activeSuggestion: 0,
168 }
169 }
170
171 static getDerivedStateFromProps(props: InsertBoxProps, state: InsertBoxState) {
172 const { cursorPosition, selection } = props

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected