Key/value component "buttons" do not resize to their value's text length

  • Goal: Setting a key/value entry format to Button should yield a button that fits the size of the value's text length.

  • Steps: Using key/value component, give it a data source that has a long value against one of the keys in the JSON object.

  • Details: There are no sizing controls for key/value buttons.

  • Screenshots:

  1. Set format to Button
    image

  2. Button is not wide enough for the value/label it contains

Hey @hansontools ,

I noticed the issue and tried to fix it. However, the key-value component doesn't provide a default auto-width option for the button. A possible solution is to inspect the button's class in the browser and apply custom CSS to adjust its width. This may be a bug.

  • Here is a screenshot.

3 Likes

Thanks, but those class names you're using in your CSS selector change and can't be relied upon.

Hello @hansontools ,

This issue will be forgotten after a Retool version upgrade when the CSS class changes automatically. Unfortunately, there is no solution for now, as this appears to be a bug.

3 Likes