refactor(core): use shallowRef where possible (#1847)
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -13,7 +13,7 @@ const DefaultNode: FunctionalComponent<NodeProps<{ label: any }>> = function ({
|
||||
isValidSourcePos,
|
||||
data,
|
||||
}) {
|
||||
const label = data.label || _label
|
||||
const label = data.label ?? _label
|
||||
|
||||
return [
|
||||
h(Handle as Component, { type: 'target', position: targetPosition, connectable, isValidConnection: isValidTargetPos }),
|
||||
|
||||
@@ -11,7 +11,7 @@ const InputNode: FunctionalComponent<NodeProps<{ label: any }>> = function ({
|
||||
isValidSourcePos,
|
||||
data,
|
||||
}) {
|
||||
const label = data.label || _label
|
||||
const label = data.label ?? _label
|
||||
|
||||
return [
|
||||
typeof label !== 'string' && label ? h(label) : h(Fragment, [label]),
|
||||
|
||||
@@ -86,7 +86,7 @@ const NodeWrapper = defineComponent({
|
||||
|
||||
const isFocusable = toRef(() => (typeof node.focusable === 'undefined' ? nodesFocusable.value : node.focusable))
|
||||
|
||||
const hasPointerEvents = toRef(
|
||||
const hasPointerEvents = computed(
|
||||
() =>
|
||||
isSelectable.value ||
|
||||
isDraggable.value ||
|
||||
|
||||
@@ -11,7 +11,7 @@ const OutputNode: FunctionalComponent<NodeProps<{ label: any }>> = function ({
|
||||
isValidTargetPos,
|
||||
data,
|
||||
}) {
|
||||
const label = data.label || _label
|
||||
const label = data.label ?? _label
|
||||
|
||||
return [
|
||||
h(Handle as Component, { type: 'target', position: targetPosition, connectable, isValidConnection: isValidTargetPos }),
|
||||
|
||||
Reference in New Issue
Block a user