vue3-dragable-grid-layout icon indicating copy to clipboard operation
vue3-dragable-grid-layout copied to clipboard

Gridlayout prop "i" should accepted also strings

Open marcelo-rebello opened this issue 3 years ago • 5 comments

the "i" property is only accepting a number, but it should also accept strings (like a guid)

marcelo-rebello avatar Sep 19 '22 05:09 marcelo-rebello

Yes, but the string should be parsed into a number

melrose13-69 avatar Oct 06 '22 12:10 melrose13-69

@melrose13-69 the "i" maybe a uuid/guid , it should also accept string

KinoshitaHanson avatar Oct 08 '22 07:10 KinoshitaHanson

@melrose13-69 using a valid UUID/GUID as an identifier is a common use case and should be supported, so I don't think this ticket should be closed.

If there is a solid reason to i be a number, then maybe add a custom or metadata object that can hold user-defined data for each GridItem.

marcelo-rebello avatar Oct 09 '22 21:10 marcelo-rebello

I'm also facing the same issue, i would like to use uuid as identifier if there's no reason to keep it only as number.

villekaa avatar Oct 11 '22 14:10 villekaa

Same issue!

i-interprete-on-the-fly avatar Oct 14 '22 12:10 i-interprete-on-the-fly

@melrose13-69 Same issue!

pengjm1121 avatar Dec 15 '22 01:12 pengjm1121

Same issue here. I really need UUID to be supported, otherwise I need to figure out how to make UUID to unique number that can be reproduced every time.

eboye avatar Apr 04 '23 11:04 eboye

You can try this https://www.npmjs.com/package/vue-ts-responsive-grid-layout which supports both string and number.

gwinnem avatar Apr 14 '23 14:04 gwinnem

@gwinnem I've tried it, but for some reason it messed up my styling. All display: flex elements are in reversed order. I haven't spent much time, but it's pretty strange and it may be that it imported css on it's own.

Try adding any flex element to GridItem with multiple children, they are going to be in reversed order.

eboye avatar Apr 15 '23 00:04 eboye

@eboye Can you send me the code where you are adding the GridLayout and GridItems and also the css you are using

gwinnem avatar Apr 15 '23 04:04 gwinnem

@gwinnem I'll try to replicate the code in some isolated environment as the code I'm applying it to is not for public eyes :D and uses a tons of directives etc. which could not be easily placed in gist or something like that.

But basic concept is that it's inside of display: grid and inside of widget there are display: flex; flex-direction: row and for some reason it acts like it's row-reverse. Can't catch where it messes things up.

eboye avatar Apr 17 '23 20:04 eboye

@eboye Hi, it sounds like it is something in your styles that it is causing this. Without any code to debug this is impossible for me.

gwinnem avatar Apr 18 '23 05:04 gwinnem

In v1.9.15, was added the type string to 'id', i property.

LwveMike avatar Jan 15 '24 10:01 LwveMike