mirror of
https://github.com/penpot/penpot.git
synced 2025-03-10 06:41:40 -05:00
🐛 Fix error after user drags layers in search functionality
This commit is contained in:
parent
441e9627b5
commit
1ef4d42b28
2 changed files with 19 additions and 14 deletions
|
@ -19,6 +19,7 @@
|
|||
- Fix selected colors allow gradients in shadows [Taiga #4156](https://tree.taiga.io/project/penpot/issue/4156)
|
||||
- Fix import files with unexpected format or invalid content [Taiga #4136](https://tree.taiga.io/project/penpot/issue/4136)
|
||||
- Fix wrong shortcut button tip of "Delete" function [Taiga #4162](https://tree.taiga.io/project/penpot/issue/4162)
|
||||
- Fix error after user drags any layer in search functionality [Taiga #4161](https://tree.taiga.io/project/penpot/issue/4161)
|
||||
|
||||
## 1.15.3-beta
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@
|
|||
(l/derived refs/workspace-local)))
|
||||
|
||||
(mf/defc layer-item
|
||||
[{:keys [index item selected objects] :as props}]
|
||||
[{:keys [index item selected objects sortable?] :as props}]
|
||||
(let [id (:id item)
|
||||
selected? (contains? selected id)
|
||||
container? (or (cph/frame-shape? item)
|
||||
|
@ -170,7 +170,8 @@
|
|||
(when-not expanded?
|
||||
(st/emit! (dwc/toggle-collapse (:id item)))))
|
||||
|
||||
[dprops dref] (hooks/use-sortable
|
||||
[dprops dref] (when sortable?
|
||||
(hooks/use-sortable
|
||||
:data-type "penpot/layer"
|
||||
:on-drop on-drop
|
||||
:on-drag on-drag
|
||||
|
@ -179,7 +180,7 @@
|
|||
:detect-center? container?
|
||||
:data {:id (:id item)
|
||||
:index index
|
||||
:name (:name item)})
|
||||
:name (:name item)}))
|
||||
|
||||
ref (mf/use-ref)]
|
||||
|
||||
|
@ -276,13 +277,15 @@
|
|||
:selected selected
|
||||
:index index
|
||||
:objects objects
|
||||
:key id}]
|
||||
:key id
|
||||
:sortable? true}]
|
||||
[:& layer-item
|
||||
{:item obj
|
||||
:selected selected
|
||||
:index index
|
||||
:objects objects
|
||||
:key id}])))]]))
|
||||
:key id
|
||||
:sortable? true}])))]]))
|
||||
|
||||
(mf/defc filters-tree
|
||||
{::mf/wrap [#(mf/memo % =)
|
||||
|
@ -299,7 +302,8 @@
|
|||
:selected selected
|
||||
:index index
|
||||
:objects objects
|
||||
:key id}]))]))
|
||||
:key id
|
||||
:sortable? false}]))]))
|
||||
|
||||
|
||||
(defn calc-reparented-objects
|
||||
|
|
Loading…
Add table
Reference in a new issue