Coder Social home page Coder Social logo

Comments (7)

Zaid-Ajaj avatar Zaid-Ajaj commented on May 27, 2024

Hello @sandeepc24,

Do you happen to have the latest version of this library?

from fabulous-simple-elements.

sandeepc24 avatar sandeepc24 commented on May 27, 2024

Hi @Zaid-Ajaj

I am using the latest version of the lib.

from fabulous-simple-elements.

sandeepc24 avatar sandeepc24 commented on May 27, 2024

Looking at the code I can't say why it's not working, IsVisible is similar to this property and it works.

from fabulous-simple-elements.

Zaid-Ajaj avatar Zaid-Ajaj commented on May 27, 2024

I can't tell for sure why it is not working. Does the equivalent code from the original DSL not disable the button either? i.e. if you write:

View.button(text="whatever", isEnabled=false)

Is the button then still not disabled? if that is the case, then you file an issue on the Fabulous repository instead

from fabulous-simple-elements.

sandeepc24 avatar sandeepc24 commented on May 27, 2024

from fabulous-simple-elements.

Blener avatar Blener commented on May 27, 2024

Hello,
I tried the code inside the SimpleFabimals sample and the button is disabled (as the image shows). Enabling the button also works.
I'm using the latest packages from Fabulous, Xamarin and SimpleElements.

Please, is there any sample code that I can try @sandeepc24 ?

image

from fabulous-simple-elements.

Blener avatar Blener commented on May 27, 2024

I got a similar issue today during work, but in my case if the button has the command set then it's always enabled.

let view (model: Model) (dispatch: Msg -> unit) =
        View.ContentPage(
          content = View.StackLayout(padding = Thickness 20.0, verticalOptions = LayoutOptions.Center,
            children = [
                Button.button [
                    Button.Text "Disabled with command"
                    Button.IsEnabled false
                    Button.OnClick ignore
                ]
                Button.button [
                    Button.Text "Disabled without command"
                    Button.IsEnabled false
                ]
                View.Button(text = "Disabled with command", isEnabled = false, command = ignore)
                View.Button(text = "Disabled without command", isEnabled = false)
            ]))

The code above generates this:
image

This happens regardless of using SimpleElements or not. I opened the issue in Fabulous repo.

Edit: As stated in the Fabulous issue, this is the default for Xamarin.

from fabulous-simple-elements.

Related Issues (11)

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.