Show React select dropdown with multiple lists mapped to the same drop down

PHOTO EMBED

Wed Sep 22 2021 23:11:26 GMT+0000 (Coordinated Universal Time)

Saved by @SlimPickins ##react ##reactselect ##javascript ##dropdown

<select
    className="form-control form-control-sm"
    id="assettype_id"
    disabled={!types ? 'disabled' : ''}
    onChange={this.handleChange}
    value={details.assettype_id || ''}
>
    <option value="0">Choose Type...</option>
    {popularTypes.length
        ? popularTypes.map((r, key) => (
                <Fragment key={r.id}>
                    {key === 0 && (
                        <option value="0" disabled>
                            --- POPULAR ITEMS ---
                        </option>
                    )}
                    <option key={key.Id} value={r.ID}>
                        {r.Name}
                    </option>
                </Fragment>
            ))
        : null}
    {types.length
        ? types.map((t, key) => (
                <Fragment key={t.id}>
                    {key === 0 && (
                        <option value="0" disabled>
                            --- ALL ITEMS ---
                        </option>
                    )}
                    <option key={key.Id} value={t.ID}>
                        {t.Name}
                    </option>
                </Fragment>
            ))
        : null}
</select>
content_copyCOPY

This uses two lists mapped into the same drop down. This list was used to show the most popular items that are contained in the second list.