Details

    • Similar Issues:
    • Epic Link:
    • Sprint:
      Blue Ocean 1.2-beta2

      Description

      I have a labelFunction that returns a html element, which is fine for the dropDown options but for the dropDown title that is no good.

              const parseOption = (option) => {
                  // do we have the default option?
                  const selected = defaultValue && defaultValue[0] && defaultValue[0].displayName === option;
                  // what css clases to use
                  const spanClass = selected ? '' : 'not-selected';
                  return (<span className={spanClass}>
                      { selected && <img
                          src={`${staticResourcePath()}/icons/done.svg`}
                          className="selected"
                          title="selected"
                      /> }
                      { option }
                  </span>);
              };
      

      Since the dropDown use the labelFunction to as well render the title of the button I need a way to define a custom title.

      <Dropdown
                      options={dropOptions}
                      title={ label }
                      labelFunction={parseOption}
                      defaultOption={ label } />
      

        Attachments

          Activity

          Show
          tscherler Thorsten Scherler added a comment - https://github.com/jenkinsci/jenkins-design-language/pull/179
          Hide
          jamesdumay James Dumay added a comment -

          Thorsten Scherler don't forget to assign tickets you are working on to yourself and add them to the sprint

          Show
          jamesdumay James Dumay added a comment - Thorsten Scherler don't forget to assign tickets you are working on to yourself and add them to the sprint

            People

            • Assignee:
              tscherler Thorsten Scherler
              Reporter:
              tscherler Thorsten Scherler
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: