1. #1
    Sencha User
    Join Date
    Aug 2013
    Posts
    9
    Answers
    2
    Vote Rating
    0
    woolhead is on a distinguished road

      0  

    Default Answered: Display empty strings in list

    Answered: Display empty strings in list


    Hey,
    I have a list, with some items. It is styled like a table via itemTpl.
    In the form, where I can add items, are some mandatory fields and some optional.
    Now the list should always be formatted like the second entry in the example image.
    When I leave the optional field in my form empty, it is saved as "" (also tried just saving spaces so it is saved like this: " "). The list looks now like the first row in my example.
    How can I get the list to "display" empty strings?
    empty_item.jpg

  2. I set the white-space property to pre and the controller removes from the "empty" field the white-space when the form gets loaded. It also adds a white-space if the form is saved while the field is still empty.
    Not really nice, but it works for now.

  3. #2
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    2,882
    Answers
    223
    Vote Rating
    89
    fmoseley is just really nice fmoseley is just really nice fmoseley is just really nice fmoseley is just really nice fmoseley is just really nice

      0  

    Default


    I'm not sure this is possible but have you tried using the <pre> tag in your itemTpl
    https://developer.mozilla.org/en-US/...ML/Element/pre

  4. #3
    Sencha User
    Join Date
    Aug 2013
    Posts
    9
    Answers
    2
    Vote Rating
    0
    woolhead is on a distinguished road

      0  

    Default


    No I haven't ^^ now it works if there is at least a space while it's still not working if I have an empty string. But this is better than nothing. Thanks!

  5. #4
    Sencha User
    Join Date
    Aug 2013
    Posts
    9
    Answers
    2
    Vote Rating
    0
    woolhead is on a distinguished road

      0  

    Default


    I set the white-space property to pre and the controller removes from the "empty" field the white-space when the form gets loaded. It also adds a white-space if the form is saved while the field is still empty.
    Not really nice, but it works for now.

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar