Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    REACT SelectItem imageURLPrefix and imageURLSuffix bug

    the specified properties do not work in the REACT component.

    You can look at this example https://smartclient.com/smartclient-...?id=selectItem

    #2
    Thanks for the report - this wasn't actually anything to do with the properties you mentioned.

    It isn't a framework bug either - it's just that the React source for this sample (and one other) still used the flags/16 icon-set, which was removed long-ago - the proper icon-set, and the one used everywhere else, is flags/24.

    Please retest with tomorrow's build.

    Comment


      #3
      I don't think the problem is the lack of icons in the specified folders. I have the same thing in my application, although there are icons.

      Below are two examples of using these properties in REACT SelectItem.

      That's not a worker
      Code:
      <SelectItem name={CONSTANT.TYPE} title={Strings.get("noticeType")}
      
                                      imageURLPrefix="[SKINIMG]notices/" imageURLSuffix=".png"
      
                                      valueMap={typesMap} valueIcons={iconsMap}
                                  />

      And that's how it works
      Code:
                                  <SelectItem name={CONSTANT.TYPE} title={Strings.get("noticeType")}
      
                                      imageURLPrefix={"[SKINIMG]notices/"} imageURLSuffix={".png"}
      
                                      valueMap={typesMap} valueIcons={iconsMap}
                                  />

      Comment


        #4
        The icon-tweak we applied was absolutely the reason for the issue you reported in the Showcase.

        Your two separate examples should render identical forms with identical images, since the prefix/suffix vars are plain strings.

        The next step is to inspect the browser to see which URLs are being assigned to the images, and whether there are 404s for them, or other related logs in the browser console.

        Also, please confirm your version - we always need that information! Your sample above is for 15.0, but a previous report from you specified 13.1 (and 14.1, in fact).
        Last edited by Isomorphic; 13 Jul 2026, 01:47.

        Comment


          #5
          Your two separate examples should render identical forms with identical images, since the prefix/suffix vars are plain strings.
          That's what I thought, but it's not true.In the first case (which is not working), the URL of the icon looks as if imageURLPrefix is not set at all. The same goes for imageURLSuffix.

          My version is v13.1p_2026-07-10/ Pro Deployment.

          Comment


            #6
            In our testing, they do.

            As we said, "The next step is to inspect the browser to see which URLs are being assigned to the images, and whether there are 404s for them, or other related logs in the browser console."

            Comment


              #7
              inspect the browser to see which URLs are being assigned to the images, and whether there are 404s for them, or other related logs in the browser console."
              I checked the URL of the icon that the browser is trying to load.
              This is https:://myAPP/images /${iconfilename}
              and it should be https:://myAPP/skins/standars/images/${iconfilename}.png

              Comment


                #8
                I added to the file /isomorphic/react/FormItem.js to the static PROPERTY_TYPES = {"imageURLPrefix":"String", "imageURLSuffix":"String"... and everything worked as it should

                Comment


                  #9
                  That's odd - strings should pass through as-is without being in PROPERTY_TYPES.

                  But we're taking a look and will update here when we have more information.

                  Comment


                    #10
                    I'm really sorry.

                    The version I specified was for the SmartClient component, not for my REACT applications.
                    I have now upgraded my REACT version of SartClient to v13.1p_2026-07-12 and this error has disappeared.

                    I apologize again for the trouble.

                    Comment


                      #11
                      Great, glad you got it fixed.

                      Comment

                      Working...
                      X