question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Visibility based on radio buttons

See original GitHub issue

In the following case, is there any way we can make the textview visible only if we select the first option

  <select
    name="CalculateDates"
    defaultValue="LMP"
    as="radiobuttons"
    label="Select">
    <option
      value="LMP date:">LMP</option>
    <option
      value="EDD date:">EDD</option>
  </select>


<textarea  
        type="string"
        name="Comments"
        label="EDD comments"></textarea>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
edongashicommented, Oct 22, 2018

Converters can now have a parameter using the following syntax:

|IsEqual('String')
|IsEqual(3)
|IsEqual(25.3)
|IsEqual(true)
|IsEqual(false)
|IsEqual(null)

The IsEqual is just a demonstration. You can create custom factories and register them in Resource.ValueConverterFactories. You cannot have a dynamic value in converters.

Note This is not Binding.ConverterParameter that is passed to IValueConverter.Convert. It was too messy and too late to implement it. Instead, the parameter is parsed from the expression and is passed to corresponding factory in the new property: Resource.ValueConverterFactories, which creates a new converter with the parameter value baked in.

For backwards compatibility we now have two dictionaries for storing converters globally:

Resource.ValueConverters is a dictionary of string : IValueConverter and Resource.ValueConverterFactories is a dictionary of string : func(object -> IValueConverter).

Feel free to register custom converters at application startup.

1reaction
hashithacommented, Oct 24, 2018

This is working well now

Read more comments on GitHub >

github_iconTop Results From Across the Web

html - Hide radio button while keeping its functionality
I have tried several methods but it seems that using display:none or visibility:hidden makes the radio function useless. But it works.
Read more >
Flow Conditional Visibility for Radio Buttons
1 Answer. Your condition for visibility is checking whether RadioButton1 equals $GlobalConstant. True. But if you want the Stores Issues radio ...
Read more >
Visibility of button based on selection of radio button in gallery
Solved: Hi all, I have a radio button within a checklist in a gallery and i set a button visibility based on the...
Read more >
How to control the visibility of the panels through radio ...
I am using radio buttons on button group to control the visibility of the uipanels. Once i switched ON the visibility of a...
Read more >
Show or Hide Content Based on Radio Button Selections
js file added functionality to use radio buttons on your web pages to show or hide content based on the user's selection. Following...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found