MCPcopy Create free account
hub / github.com/react-dnd/react-dnd / pinSource

Method pinSource

packages/dnd-core/src/HandlerRegistry.js:156–162  ·  view source on GitHub ↗
(sourceId)

Source from the content-addressed store, hash-verified

154 }
155
156 pinSource(sourceId) {
157 const source = this.getSource(sourceId);
158 invariant(source, 'Expected an existing source.');
159
160 this.pinnedSourceId = sourceId;
161 this.pinnedSource = source;
162 }
163
164 unpinSource() {
165 invariant(this.pinnedSource, 'No source is pinned at the time.');

Callers 1

beginDragFunction · 0.80

Calls 1

getSourceMethod · 0.95

Tested by

no test coverage detected