Coder Social home page Coder Social logo

Comments (10)

LucyChyzhova avatar LucyChyzhova commented on August 24, 2024 3

UPD: Katja and I created an example that contains an object as a value and we could reproduce the problem in lime-elements. I will continue with an investigation.

Screen.Recording.2024-02-12.at.13.34.50.mov

from lime-elements.

adrianschmidt avatar adrianschmidt commented on August 24, 2024 2

Although… hmm… the latest lime-elements should be OK with the types you are using, I would have thought… since we merged a fix for this issue… 🤔

EDIT: On a closer inspection, it seems none of the errors are complaining about the specific incompatibility we fixed here. So I think all is as it should be 👍

from lime-elements.

BregenzerK avatar BregenzerK commented on August 24, 2024 1

No I was just testing with existing examples and implementations of the picker, such as in Lime Elements. I don't think I'm the right person for this task to be honest. It'd be way more effective if you or your team makes a PR i elements I'd say.

It doesn't have to be you and it isn't super urgent. Sure we can look at it, but so can anyone in the feature team I guess

from lime-elements.

Kiarokh avatar Kiarokh commented on August 24, 2024 1

please send me the example code @LucyChyzhova and we will test it in this PR: #2777

from lime-elements.

BregenzerK avatar BregenzerK commented on August 24, 2024 1

One thing that struck me while helping Lucy a little with this, is that limel-picker's value property was typed as ListItem<number | string> | Array<ListItem<number | string>>, so it seems to me like you ought to have gotten a compiler error when you tried to pass in a ListItem<T> where T was some kind of object… 🤔

https://github.com/Lundalogik/lime-elements/pull/2784/files#diff-4a10e2cfaa535f50e4e86a2dcc0614e52c64ba1e38c8f287c9dde9c8d04bb6d9L112

Do you know where it's being used with an object @BregenzerK? I'd love to have a look.

Although, we have had some trouble with the types not being exported properly from lime-elements, so perhaps that's why there was no error 🤷‍♂

It's been weird a bit with the ListItem interface, it enforced the interface in general but not at all the interface for the value. you can see it in action on this PR. I had hoped that adding RecipientValue to all the ListItem definition would give me autocompletion and potential building errors, but it didn't.

from lime-elements.

Kiarokh avatar Kiarokh commented on August 24, 2024

@BregenzerK are you sure this is not dependent on your implementation? I'm testing it other places, but it seems to be working fine. 🤔

from lime-elements.

BregenzerK avatar BregenzerK commented on August 24, 2024

@BregenzerK are you sure this is not dependent on your implementation? I'm testing it other places, but it seems to be working fine. 🤔

I'm pretty certain, since I get the wrong values from the event inside the picker. Did you test it with an object as value? should we test this together?

from lime-elements.

Kiarokh avatar Kiarokh commented on August 24, 2024

No I was just testing with existing examples and implementations of the picker, such as in Lime Elements. I don't think I'm the right person for this task to be honest. It'd be way more effective if you or your team makes a PR i elements I'd say.

from lime-elements.

adrianschmidt avatar adrianschmidt commented on August 24, 2024

One thing that struck me while helping Lucy a little with this, is that limel-picker's value property was typed as ListItem<number | string> | Array<ListItem<number | string>>, so it seems to me like you ought to have gotten a compiler error when you tried to pass in a ListItem<T> where T was some kind of object… 🤔

https://github.com/Lundalogik/lime-elements/pull/2784/files#diff-4a10e2cfaa535f50e4e86a2dcc0614e52c64ba1e38c8f287c9dde9c8d04bb6d9L112

Do you know where it's being used with an object @BregenzerK? I'd love to have a look.

Although, we have had some trouble with the types not being exported properly from lime-elements, so perhaps that's why there was no error 🤷‍♂

from lime-elements.

adrianschmidt avatar adrianschmidt commented on August 24, 2024

It's been weird a bit with the ListItem interface, it enforced the interface in general but not at all the interface for the value. you can see it in action on this PR. I had hoped that adding RecipientValue to all the ListItem definition would give me autocompletion and potential building errors, but it didn't.

I think it's because of the issues we've had with exporting the typings. I pulled down that PR branch, rebased it on main, and tried building it. No errors. But when I installed the latest lime-elements, the build failed with a bunch of errors about incompatible types.

from lime-elements.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.