Giter Site home page Giter Site logo

combopicker's Issues

Support more complicated value formatters

Overview

Currently, the only way to format values displayed in the picker is by overriding the label property of the ComboPickerModel implementation. This doesn't allow further customization, such as using additional context when formatting.

Proposed Solution

Add a new property that allows clients to inject a value formatter. This formatter is a generic protocol that must accept values of the ComboPickerModel implementation and return strings.

This won't be applied to macOS, where the LosslessStringConvertible must be used instead.

Allow customizing font for picker

Overview

On iOS and iPadOS, it should be possible to customize the font of items displayed in the picker. The same font should also be applied to the manual input field, for consistency.

Proposed Solution

We could make use of this delegate method, instead of the limited one we're using in NativePicker.Coordinator right now.

Multiple ComboPicker in the same view conflict with each other

Overview

Because of a limitation on how the Picker works in SwiftUI, when displaying two (or more) ComboPicker in the same view, only one of them will work correctly. The last added will intercept all tap and scroll events and will prevent the other pickers from being used.

This is only a problem on iOS and iPadOS.

Proposed Solution

This could be fixed by rolling-out our own picker implementation, instead of relying on the system one. This would also have the benefit of allowing custom sizes (instead of forcing the picker to be as wide as its container).

Layout issues in List

Overview

There are some layout issues when embedding the picker in a list, possibly because of the additional space that the picker would like to take.

Screenshot 2022-07-03 at 16 47 30

Proposed Solution

Investigate how to override the intrinsicContentSize of the NativePicker, so that AutoLayout knows what size the picker should have.

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.