@travelswitchhq/flight-search-react 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1127,17 +1127,17 @@ padding-inline-start: 25px;
1127
1127
  flex: 0 1 auto;
1128
1128
  min-width: fit-content;
1129
1129
  }
1130
- .MobileShow{
1130
+ .sw-container .MobileShow{
1131
1131
  display: none;
1132
1132
  }
1133
- .MobileHide{
1133
+ .sw-container .MobileHide{
1134
1134
  display: block;
1135
1135
  }
1136
1136
  @media screen and (max-width: 768px) {
1137
- .MobileShow{
1137
+ .sw-container .MobileShow{
1138
1138
  display: block;
1139
1139
  }
1140
- .MobileHide{
1140
+ .sw-container .MobileHide{
1141
1141
  display: none;
1142
1142
  }
1143
1143
  .sw-container{
@@ -1319,6 +1319,9 @@ padding-inline-start: 25px;
1319
1319
  .sw-fsrh-chk-main{
1320
1320
  flex-wrap: wrap;
1321
1321
  }
1322
+ .sw-custom-dropdown-trigger{
1323
+ pointer-events: none;
1324
+ }
1322
1325
  }
1323
1326
  `;
1324
1327
 
@@ -2131,7 +2134,29 @@ function FlightSearchWidget({
2131
2134
  {
2132
2135
  type: "text",
2133
2136
  id: `${dropdownType}-${segmentIndex}`,
2134
- className: `sw-custom-dropdown-trigger ${value === placeholder || !value ? "sw-placeholder" : ""}`,
2137
+ className: `sw-custom-dropdown-trigger MobileHide ${value === placeholder || !value ? "sw-placeholder" : ""}`,
2138
+ value: value === placeholder ? "" : value ?? "",
2139
+ placeholder,
2140
+ onFocus: (e) => {
2141
+ onOpen();
2142
+ e.currentTarget.select();
2143
+ },
2144
+ onClick: (e) => e.currentTarget.select(),
2145
+ onChange: (e) => {
2146
+ const val = e.target.value;
2147
+ handleSegmentFieldChange(segmentIndex, dropdownType, val);
2148
+ triggerSearchAirport(segmentIndex, dropdownType, val);
2149
+ },
2150
+ onKeyDown: (e) => handleKeyDown(e, dropdownType, segmentIndex)
2151
+ }
2152
+ ),
2153
+ /* @__PURE__ */ jsx(
2154
+ "input",
2155
+ {
2156
+ type: "text",
2157
+ readOnly: true,
2158
+ id: `${dropdownType}-${segmentIndex}`,
2159
+ className: `sw-custom-dropdown-trigger MobileShow ${value === placeholder || !value ? "sw-placeholder" : ""}`,
2135
2160
  value: value === placeholder ? "" : value ?? "",
2136
2161
  placeholder,
2137
2162
  onFocus: (e) => {