Skip to content

Commit be02db7

Browse files
Fixed the issue on MultiSelect Dropdown
1 parent 66db066 commit be02db7

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,20 @@ It allows users to type, filter, and select from a list of options — similar t
1414
1. In Xcode, open your project.
1515
2. Go to File → Add Packages...
1616
3. Enter the repository URL:
17-
18-
https://github.com/usamajavedswl/DropdownTextField.git
17+
```https://github.com/usamajavedswl/DropdownTextField.git```
1918

2019
4. Choose the latest version and add it to your target.
2120
Then simply import it:
2221

23-
```import DropdownTextField```
22+
```swift
23+
import DropdownTextField
24+
```
2425

2526
### Usage Example
2627
Here’s how to use SearchableMenu inside your SwiftUI view:
27-
```
28+
29+
30+
```swift
2831
import SwiftUI
2932
import DropdownTextField
3033

@@ -50,13 +53,13 @@ struct ContentView: View {
5053
}
5154
.padding()
5255
}
53-
}
54-
```
56+
}```
57+
5558

5659
### Full Initializer
5760
For customization, you can use all available parameters:
5861

59-
```
62+
```swift
6063
SearchableMenu(
6164
searchText: $searchText,
6265
isDropdownVisible: $isDropdownVisible,
@@ -77,12 +80,11 @@ SearchableMenu(
7780
addNewTextFormat: "Add \"%@\""
7881
){
7982
print("Dropdown opened")
80-
}
81-
```
83+
}```
8284

8385
### Notes
84-
*onTap* is called when the dropdown field becomes active.
85-
*addNew* enables the option to add new items that don’t exist in the list.
86+
**onTap** is called when the dropdown field becomes active.
87+
**addNew** enables the option to add new items that don’t exist in the list.
8688
The view automatically filters options based on the typed text.
8789

8890
## License

Sources/MultiSelectionMenu/MultiSelectionMenu.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import SwiftUI
1515
import Combine
1616

17+
@available(iOS 17.0, *)
1718
public struct MultiSelectMenu: View {
1819
@State private var selectedOptions: [String] = []
1920
@State private var searchText: String = ""
@@ -227,6 +228,7 @@ public struct MultiSelectMenu: View {
227228
}
228229

229230
// MARK: - Private helpers
231+
@available(iOS 17.0, *)
230232
extension MultiSelectMenu {
231233
private var filteredOptions: [String]{
232234
if searchText.isEmpty { return options }

0 commit comments

Comments
 (0)